LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

non-linear curve fitting

Hello all,

 

I'm fitting spectra with either a Gaussian or Lorentzian fit.  If I use the Curve Fit Express VI, it works but I don't see a way to wire in my Initial Guesses.  I have to type them into the Express VI dialog box and I want to get them at runtime. 

 

On the other hand, if I try to use the regular Non-Linear Curve Fit vi (with Lev-Mar formula string for the polymorphic selector) I get a Singular Matrix error, even though I type in the exact same equation and have the same intial guesses ???

 

Any help appreciated!

thanks.

 

0 Kudos
Message 1 of 4
(2,840 Views)

Post your VI.

Did you notice that the X and Y inputs are inverted in the non Express VI (I never used Express VIs but in this case, the connectors make more sense that the "historical" Fitting VIs)? Inverting both would result in nonsense.

You can also step through (turn on debuggin) the process and find out when and where that happens.

0 Kudos
Message 2 of 4
(2,831 Views)

Please attach your code.

0 Kudos
Message 3 of 4
(2,822 Views)

Hi All,

 

I was getting some weird error from the forum website and couldn't respond over the weekend.

Anyway, I right-clicked on the Express CurveFit.vi" and chose "Open Front Panel".  I was then able to wire in my initial guesses and things are working well.

 

Thanks for the help.

 

0 Kudos
Message 4 of 4
(2,759 Views)