02-15-2006 01:08 PM
02-15-2006 03:27 PM
Download Gaussian/Loretzian Fit Demo. 🙂
Let me know if you have questions.
02-26-2006 05:14 AM
11-10-2008 01:41 PM
Hello, I have exactly the same trouble. I will try with the Altenbach solution.
thanks-
11-10-2008 02:02 PM
ikarus wrote:Hello, I have exactly the same trouble.
What is the "same"? Do you also have 7.1?
Let me know if you have any questions. My example is relatively primitive.
11-10-2008 07:54 PM
Hello,
Yes. I have LabVIEW 7.1, and I need to do a Gaussian fit for an array of data. I did it in LabVIEW 8 with the VI "Gaussian Peak Fit", but it's imperative for me to do this in LabVIEW 7.1.
i'm trying to adapt your programming to my necessity.
11-11-2008 11:27 AM
The fitting works fine, but now I need to build the Gaussian function with the coefficients, and i don't know what is the form of the function.
In the Labview 8 Help appears the formula shown in the picture below.
11-11-2008 01:34 PM
I use the "spectroscopist" definition where the width is defined as "width at half maximum". This is more approriate for my use.
NI seems to be using the "statistician" definition, where the width is defined in terms of a "standard deviation".
You can easily rewrite my model subVI to redefine this parameter. Most likely, you also want to add a few inputs such as the x-values, etc. as needed. (My demo is extremely stripped down and assumes a fixed set of X values as x=0..255.)
02-19-2009 04:07 AM
Dear altenbach,
Can you explain why the gauss function is exp(-0.693*(1+((x-mean)/std) **2) instead exp(-0.5*((x-mean)/std)**2)
Thanks
02-27-2009 08:22 AM
I'd use the L-M non-linear fit. I would recommend a model equation of
f(x) = a * exp(-(x - mu)*(x - mu)/(2 * sigma * sigma)) + slope * x + c
Just feed initial guesses and works great for a gaussian fit that might not be necessarily symmetric !