LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fit Sum of 3 Guassians with offset - implementable using Curve Fitting Express VI?

Hi:

I have a curve fit problem that I am trying to solve that is near to a curve fit example shipped in LabVIEW 8.5 called "Fit Sum of 3 Guassians with offset."  In my case I also have to add a Lorentzian component so I have a mixed weighted combination.

As a first step, I expect that something like this should be modelable using the Curve Fitting Express VI using the nonlinear model.  I am going to make the assumption that for now it is OK for me to stay with the Lev-Marq solver.

Selecting the non-linear model in the Express VI and starting with the guassian model of a*exp (-3.306((x-b)/c))^2  where a is amplitude, b is center, and c is full-width half max, I am unable to input this expression in the non-linear control box of the express VI without the "red light" appearing on the control (which I am assuming means that I have input an invalid model).  Why?  Are there only certain models that are valid to input? What are the restrictions? Any help / advice in terms of the problems I am having with the Express VI would be appreciated.

Sincerely,

Don
0 Kudos
Message 1 of 3
(2,793 Views)
Don,

Just missed a multiply in your formula.  Here is a version that seems correct syntactically:
a*exp (-3.306*((x-b)/c))^2

The express VI is OK for a quick prototype, but for better performance I would recommend against using the formula string model/express VI.  Try using the VI reference method instead.

-Jim
Message 2 of 3
(2,766 Views)

Yes, I don't know how I missed that.  Thanks for looking.  I am currently coding up my own version that uses static references to the VI for multiple peak guassian, multiple peak lorentzian, and multiple peak combination of weighted guassian and lorentzian.   It looks like it is going to do a pretty good job with the Lev-Marq solver.

 

Sincerely,

 

Don



Message Edited by DonRoth on 04-01-2008 06:50 AM
0 Kudos
Message 3 of 3
(2,752 Views)