LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

nonlinear fitting of maxhold graph data

A resonant curve is recorded by using maxhold function with a spectrum analyzer. Therefore my graph is a set of data with each 'x ' point corresponding to many 'y' value. The question is can I use labview to do nonlinear fitting to this graph? If yes, how? Thanks a lot.
0 Kudos
Message 1 of 3
(2,829 Views)
The non-linear Lev-Mar fitting routines minimize the Chi-Square distance between the data and the model. The Chi-Square distance is just the Least-Squares distance weighted by the inverse of the standard-deviation at a each point. Points that have small standard deviations are presumed to be "better" and are given more weight. The online help for the Nonlinear Lev-Mar Fit.vi has all the relevant definitions and formulae.

In your example you would find the mean and standard deviation of the Y values for a given X. Do this for all X values. You will then have your original array of X values, an array of means (Y values), and an array of standard deviations. These are the inputs to the Lev-Mar VIs, namely "Nonlinear Lev-Mar fit.vi" and Levenberg-Marquardt.vi".

0 Kudos
Message 2 of 3
(2,829 Views)
Hello!

A different approach would be to use the Curve Fitting Express VI (Signal Analysis subpalette) which allows you to use a Quadratic, Spline or Polynomial Model Type. Please be aware that you will not find this Express VI in the subpalette if you have the Base Package of LabVIEW.

Hope this helps!

S Vences
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,829 Views)