06-23-2011 02:56 PM
I am generating some Lorentzian data and adding some noise to it before doing some other odd end things... Anyway, I've rigged the ending data to the Nonlinear Curve Fit.VI, though it's giving me the above error. I checked into other questions of this matter, and still couldn't manage to fix it. Would someone mind helping me or at the least, pointing me in the right direction?
Attached is what I've got.
Please and Thanks,
Vari
06-23-2011 03:09 PM - edited 06-23-2011 03:18 PM
Can you save the VI with typical default values in all controls?
(also consider FOR loops, since the number of iterations is known from the start)
06-23-2011 03:29 PM
You are feeding in too many initial parameters, there should only be 3. Plus the first Y value is NaN which is a problem.
06-23-2011 03:44 PM - edited 06-23-2011 04:29 PM
A good test for the model is a simple VI. You can call the Model reference as follows:
I recommend to always do this with the parameter estimates to see if the guesses are even reasonable. Graph the actual data and the curve calculated from the initial guesses on the same graph.
And, Yes, as Darin says, the array size of the initial estimates needs to correspond to the number of parameters in the model. No way around that. 😄
06-23-2011 04:06 PM
I've got the initial parameters down now, thanks. But I must ask about my Y value problem; What exactly? Sorry, not entirely familiar with the lingo yet. NaN means not a number, correct? I think it is a number.
06-23-2011 04:07 PM
Thanks for your input as well, AB. 😜 Much appreciated testing material and info.
06-23-2011 04:17 PM
I was guessing the default values and missed the Width control. 0 width gave a NaN value (Not a Number, in this case 0/0).