Finds the set of linear coefficients slope and intercept, which describe the line that best represents the input data set. This VI is a subVI of the Linear Fit VI.
The general form of the linear fit is given by
F = mX + b
where F is the sequence representing the best fitted values. X represents the input sequence X Values, m is the slope, and b is the intercept.
![]() |
Y Values must contain at least two points: n is greater than or equal to 2. If there are less than two sample points, the VI sets slope and intercept to NaN and returns an error. |
![]() |
X Values must contain at least two points: n is greater than or equal to 2. If there are less than two sample points, the VI sets slope and intercept to NaN and returns an error. |
![]() |
slope is the slope of the calculated linear fit. |
![]() |
intercept is the intercept of the calculated linear fit. |
![]() |
error returns any error or warning condition from the VI. |