Owning Palette: Advanced Curve Fitting VIs
Requires: Full Development System
Returns the Polynomial Coefficients of the general polynomial fit for a data set (X, Y) using the Least Square, Least Absolute Residue, or Bisquare methods.
Add to the block diagram | Find on the palette |
Coefficient Constraint specifies the constraints on Polynomial Coefficients of certain orders by setting the coefficient of order to coefficient. Use Coefficient Constraint if you know the exact values of certain polynomial coefficients.
| |||||||||||||||
polynomial order specifies the order of the polynomial to fit to the data set. polynomial order must be greater than or equal to 0. If polynomial order is less than zero, this VI sets Polynomial Coefficients to an empty array and returns an error. polynomial order must be less than or equal to 25. If polynomial order is greater than 25, the VI sets the coefficients in Polynomial Coefficients to zero and returns a warning. The default is 2. |
|||||||||||||||
Y is the array of dependent values. The number of sample points in Y must be greater than polynomial order. If the number of sample points is less than or equal to polynomial order, this VI sets Polynomial Coefficients to an empty array and returns an error. | |||||||||||||||
X is the array of independent values. The number of sample points in X must be greater than polynomial order. If the number of sample points is less than or equal to polynomial order, this VI sets Polynomial Coefficients to an empty array and returns an error. X must be the same size as Y. | |||||||||||||||
Weight is the array of weights for the observations (X, Y). Weight must be the same size as Y. If you do not wire an input to Weight, the VI sets all elements of Weight to 1. If an element of Weight is less than 0, the VI uses the absolute value of the element. | |||||||||||||||
tolerance determines when to stop the iterative adjustment of Polynomial Coefficients when you use the Least Absolute Residual or Bisquare method. For the Least Absolute Residual method, if the relative difference of the weighted mean error of the polynomial fit in two successive iterations is less than tolerance, this VI returns the resulting Polynomial Coefficients. For the Bisquare method, if any relative difference between Polynomial Coefficients in two successive iterations is less than tolerance, this VI returns the resulting Polynomial Coefficients. If tolerance is less than or equal to 0, this VI sets tolerance to 0.0001. |
|||||||||||||||
method specifies the fitting method.
|
|||||||||||||||
algorithm specifies the algorithm this VI uses to compute Polynomial Coefficients. Use SVD for Rank Deficient H if all other algorithms are unsuccessful.
|
|||||||||||||||
Polynomial Coefficients returns the coefficients of the fitted model in ascending order of power. The total number of elements in Polynomial Coefficients is m + 1, where m is the polynomial order. | |||||||||||||||
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
This VI is similar to the General Polynomial Fit VI, but it does not return the y-values or weighted mean error of the fitted model.