Back to Class Index
LINFIT(X, Y)This function generates the values for a straight line least squares fit. The output of this function is the vector of estimated y values on the left hand side of the above equation. The input vector X and Y must both be row vectors or both column vectors. The output vector will be a row vector if X and Y are row vectors, and a column vector if X and Y are column vectors. The length of the output vector is equal the length of the input vectors. This function is equivalent to POLYFIT(X, Y, 1). Parameters X A range representing a column vector of independent variables values Y A range representing a column vector of dependent variables values Example Matrix B1..B5 = 1 2 3 4 5 Matrix C1..C5 = 3 5 11 18 31 LINFIT(B1..B5, C1..C5) = -0.2 6.7 13.6 20.5 27.4 |