Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Linear Fit Coefficients (Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Returns the slope and intercept of the linear fit for a data set (X, Y) using the Least Square, Least Absolute Residual, or Bisquare method.

Details  

Y is the array of dependent values. Y must contain at least two points.
X is the array of independent values. 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 Weight is unwired, this VI sets all elements of Weight to 1.

If an element in Weight is less than 0, this VI uses the absolute value of the element.
tolerance determines when to stop the iterative adjustment of slope and intercept when you use the Least Absolute Residual or Bisquare method. If the relative difference of the weighted mean error of the linear fit in two successive iterations is less than tolerance, this VI returns the resulting slope and intercept.

If tolerance is less than or equal to 0, this VI sets tolerance to 0.0001.
method specifies the fitting method. The default is Least Square.

0Least Square (default)
1Least Absolute Residual
2Bisquare
slope returns the slope of the fitted model.
intercept returns the intercept of the fitted model.
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.

Linear Fit Coefficients Details

This VI is similar to the Linear Fit VI but does not return the y-values or weighted mean error of the fitted model.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit