LabVIEW 2016 Help | |

LabVIEW 2017 Help | |

LabVIEW 2018 Help | |

LabVIEW 2019 Help | |

LabVIEW 2020 Help |

**Owning Palette:** Fitting VIs

**Requires:** Full Development System

Use the pull-down menu to select an instance of this VI.

data specifies static data that the user-defined function needs at run time. | |||||||

f(x,a) is a reference to the VI that implements the fitting model. a is the set of parameters LabVIEW calculates. Use the VI template located at labview\vi.lib\gmath\NumericalOptimization\LM model function and gradient.vit to create the VI from a template. | |||||||

Y specifies the array of dependent values. The number of input points must be greater than zero and greater than the number of initial parameters. The number of elements in Y must be equal to the number of elements in X. | |||||||

X specifies the array of independent values. The number of input points must be greater than zero and greater than the number of initial parameters. The number of elements in X must be equal to the number of elements in Y. | |||||||

Weight is the array of weights for the observations Y. If Weight is unwired, this VI sets all elements of Weight to 1. If Weight has fewer elements than Y, this VI pads the end of Weight with ones so that the length of Weight equals the length of Y. If Weight has more elements than Y, this VI ignores the extra elements at the end of Weight. If an element in Weight is less than 0, this VI uses the absolute value of the element.
| |||||||

initial parameters specifies the initial guess for a solution. The success of the nonlinear curve fit depends on how close the initial parameters are to the solution. Therefore, use any available resources to obtain good initial guess coefficients to the solution before you use this VI. | |||||||

error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | |||||||

termination specifies the stopping conditions for the fitting process.
| |||||||

parameter bounds is a cluster that contains the upper and lower numeric limits for the parameters being optimized.
| |||||||

method specifies the fitting method.
| |||||||

number of function calls returns the number of times LabVIEW called f(x,a) during the fitting process. | |||||||

best nonlinear fit returns the y-values of the fitted model that correspond to the independent values in X. | |||||||

best fit parameters returns the array of parameters that minimizes the weighted mean square error between the solution vector and the observed y-values. | |||||||

covariance returns the matrix of covariances. C is the covariance between _{jk}a[j] and a[k]. c[jj] is the variance of a[j]. This VI generates the covariance, C, according to the following equation:
D is the Hessian of the function with respect to its parameters.
| |||||||

residue returns the weighted mean square error between the best nonlinear fit and Y. | |||||||

error out contains error information. This output provides standard error out functionality. |

Note Uses the trust-region dogleg algorithm to determine the set of parameters 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 parameters. |

data specifies static data that the user-defined function needs at run time. | |||||||

f(x,a) is a reference to the VI that implements the fitting model. a is the set of parameters LabVIEW calculates. Use the VI template located at labview\vi.lib\gmath\NumericalOptimization\LM model function and gradient.vit to create the VI from a template. | |||||||

Y specifies the array of dependent values. The number of input points must be greater than zero and greater than the number of initial parameters. The number of elements in Y must be equal to the number of elements in X. | |||||||

X specifies the array of independent values. The number of input points must be greater than zero and greater than the number of initial parameters. The number of elements in X must be equal to the number of elements in Y. | |||||||

Weight is the array of weights for the observations Y. If Weight is unwired, this VI sets all elements of Weight to 1. If Weight has fewer elements than Y, this VI pads the end of Weight with ones so that the length of Weight equals the length of Y. If Weight has more elements than Y, this VI ignores the extra elements at the end of Weight. If an element in Weight is less than 0, this VI uses the absolute value of the element.
| |||||||

initial parameters specifies the initial guess for a solution. The success of the nonlinear curve fit depends on how close the initial parameters are to the solution. Therefore, use any available resources to obtain good initial guess coefficients to the solution before you use this VI. | |||||||

error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | |||||||

termination specifies the stopping conditions for the fitting process.
| |||||||

parameter bounds is a cluster that contains the upper and lower numeric limits for the parameters being optimized.
| |||||||

method specifies the fitting method.
| |||||||

number of function calls returns the number of times LabVIEW called f(x,a) during the fitting process. | |||||||

best nonlinear fit returns the y-values of the fitted model that correspond to the independent values in X. | |||||||

best fit parameters returns the array of parameters that minimizes the weighted mean square error between the solution vector and the observed y-values. | |||||||

covariance returns the matrix of covariances. C is the covariance between _{jk}a[j] and a[k]. c[jj] is the variance of a[j]. This VI generates the covariance, C, according to the following equation:
D is the Hessian of the function with respect to its parameters.
| |||||||

residue returns the weighted mean square error between the best nonlinear fit and Y. | |||||||

error out contains error information. This output provides standard error out functionality. |

Helpful

Not Helpful