Uses the Levenberg-Marquardt algorithm to determine the least squares set of coefficients that best fit the set of input data points (X,Y) as expressed by a nonlinear function y=f(x,a), where a is the set of coefficients. Details
![]() |
Standard Deviation is the array of standard deviations, sigma[i], for data point (x[i],y[i]). If the standard deviations are all equal or if they are unknown, do not wire this input and use the default of 1.0. | ||||
![]() |
X is the array of data points representing the independent variable x. | ||||
![]() |
Y is the array of data points representing the observed values of the dependent variable y. | ||||
![]() |
Initial Guess Coefficients is your initial guess of the solution coefficients. | ||||
![]() |
max iteration is the maximum executing iteration. If the VI reaches maximum iteration without finding a solution, the function returns an error. You must increase the max iteration or adjust the Initial Guess Coefficients to get a solution. | ||||
![]() |
derivative specifies the method used to calculate the Jacobian.
Use the formula you specified in the Formula Node on the block diagram of the Target Fnc & Deriv NonLin VI to compute the Jacobian.
|
||||
![]() |
Covariance is the matrix of covariances C.
![]() ![]() ![]() ![]() ![]() |
||||
![]() |
Best Fit Coefficients is the set of coefficients that minimize
![]() |
||||
![]() |
Best Fit is the fitted data
![]() |
||||
![]() |
mse is the mean squared error. | ||||
![]() |
error returns any error or warning condition from the VI. |
This VI determines the set of coefficients that minimize the chi-square quantity:
In this equation, are the input data points, and is the nonlinear function
where are coefficients. If the measurement errors are independent and normally distributed with constant, standard deviation
this is also the least-square estimation.
You must specify the nonlinear function f = f(X,A) in the Formula Node on the block diagram of the Target Fnc & Deriv NonLin VI, which is a subVI of the Nonlinear Lev-Mar Fit VI. You can access the Target Fnc & Deriv NonLin VI by selecting it from the menu that appears when you select Project»This VI's SubVIs.
This VI provides the following two methods to calculate the Jacobian (partial derivatives with respect to the coefficients) needed in the algorithm:
The input arrays X and Y define the set of input data points. The VI assumes that you have prior knowledge of the nonlinear relationship between the x and y coordinates. That is, f = f(X,A), where the set of coefficients, A, is determined by the Levenberg-Marquardt algorithm.
Using this function successfully sometimes depends on how close your initial guess coefficients are to the solution. Therefore, it is always worth taking effort and time to obtain good initial guess coefficients to the solution from any available resources before using the function.