an error in curve fitting

  • Follow


When I used the GUI tool of curve fitting (cftool) and implemented a fitting task with the power func. form  a*x^b+c, and clicked the button "apply", a error message appeared,

"Fit could not be computed due to error: Argument must contain a string or function_handle."

I don't know why?
Can somebody give me some hints about that error?
Thanks a million.
0
Reply Yuquan 1/7/2010 1:11:05 PM

"Yuquan DU" <duyuquan2006@yahoo.cn> wrote in message 
news:hi4mh9$i46$1@fred.mathworks.com...
> When I used the GUI tool of curve fitting (cftool) and implemented a 
> fitting task with the power func. form  a*x^b+c, and clicked the button 
> "apply", a error message appeared,
>
> "Fit could not be computed due to error: Argument must contain a string or 
> function_handle."
>
> I don't know why?
> Can somebody give me some hints about that error?

As the message states, one of the arguments that the fitting functionality 
attempts to retrieve from the GUI is not a string or function handle, but 
the fitting functionality expected it to be.

Can you describe in more detail specifically what procedure you're following 
to perform the fitting?  What buttons you press in what order, what data you 
enter or select in different fields, etc.

-- 
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ 


0
Reply Steven 1/7/2010 2:24:42 PM


"Steven Lord" <slord@mathworks.com> wrote in message <hi4qr2$416$1@fred.mathworks.com>...
> 
> "Yuquan DU" <duyuquan2006@yahoo.cn> wrote in message 
> news:hi4mh9$i46$1@fred.mathworks.com...
> > When I used the GUI tool of curve fitting (cftool) and implemented a 
> > fitting task with the power func. form  a*x^b+c, and clicked the button 
> > "apply", a error message appeared,
> >
> > "Fit could not be computed due to error: Argument must contain a string or 
> > function_handle."
> >
> > I don't know why?
> > Can somebody give me some hints about that error?
> 
> As the message states, one of the arguments that the fitting functionality 
> attempts to retrieve from the GUI is not a string or function handle, but 
> the fitting functionality expected it to be.
> 
> Can you describe in more detail specifically what procedure you're following 
> to perform the fitting?  What buttons you press in what order, what data you 
> enter or select in different fields, etc.
> 
> -- 
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ 
> 
================================================
I used the following steps:
1. I create a data set with the sample data from 
               g=3+4.*u.^2.5; u=1:20
2. I pressed the "new fit" button, and with the correct data set, I chose the "pow"  func in the field of "type of fit"; Specifically, I chose the func form
                              "a*x^b+c"
3. At last, I pressed the "apply" button, which resulted in the error message

"Fit could not be computed due to error:Argument must contain a string or function_handle."
in the result sub-window.
0
Reply Yuquan 1/8/2010 12:24:04 AM

2 Replies
236 Views

(page loaded in 0.597 seconds)


Reply: