LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lorentzian Curve Fitting Issues 'syntax error of parser' message (-23001) Included!

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 

0 Kudos
Message 1 of 7
(2,593 Views)

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)

0 Kudos
Message 2 of 7
(2,588 Views)

You are feeding in too many initial parameters, there should only be 3.  Plus the first Y value is NaN which is a problem.

Message 3 of 7
(2,571 Views)

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. 😄

 

 

Download All
Message 4 of 7
(2,566 Views)

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.

0 Kudos
Message 5 of 7
(2,556 Views)

Thanks for your input as well, AB. 😜 Much appreciated testing material and info. 
 

0 Kudos
Message 6 of 7
(2,555 Views)

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). 

0 Kudos
Message 7 of 7
(2,550 Views)