LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use the Levenberg Marquardt vi to fit a function which cannot be expressed by a sting in labview?

The model which is input into the Levenberg Marquardt vi consists of a sting to represent the arbitrary formula. In my case I need to fit to a more complex formula,attached as a jpg is the formula, where P0, corresponds to a displacement of the entire curve along the x axis, and the second parameter, P1, is related to the intensity distribution FWHM. How can I input such as model into this vi? Any suggestions are MUCH appriciated!
0 Kudos
Message 1 of 4
(3,132 Views)
The model equation is more or less the same as what can be used in a formula node. Unfortunately, the erf() error function requires an integral, and calculus is not supported by it. If you really need to do this type of calculation, you may have to design the algorithm yourself, or use a more powerful mathmatics application in conjunction with LabVIEW such as MatLab. (using a Matlab script node perhaps)
0 Kudos
Message 2 of 4
(3,132 Views)
The erf() function can be found in the Mathematics>>Probabilitya and Statistics>>Probability palette.
0 Kudos
Message 3 of 4
(3,132 Views)
Assuming that the final solution has P0 & P1 as a constant...
The equation has 1 variable (x). Unfortunately, as there is no erfc Formula Operator, you need to use a polynomial expansion (Taylor series or other) in place of it within the formula string. You cannot use the erfc.vi in conjunction with the Lev-Marq.vi unless it's output is a constant (which it isn't, being dependent upon x).
~~Jonnie 5 (struggling w/ similar issues)


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 4 of 4
(3,132 Views)