next up previous contents index
Next: LLS Up: A Function Reference Previous: LINCOEF

LINFIT

 

Syntax: @LINFIT(X, Y)

X = a range representing a column vector of independent variables values
Y = a range representing a column vector of dependent variables values

@LINFIT 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 the length of the input vectors. This function is equivalent to @POLYFIT(X, Y, 1).

Example:

Matrix B1..B5 =

B
1 1
2 2
3 3
4 4
5 5

Matrix C1..C5 =

C
1 3
2 5
3 11
4 18
5 31

@LINFIT(B1..B5, C1..C5) =
-0.2
6.7
13.6
20.5
27.4


next up previous contents index
Next: LLS Up: A Function Reference Previous: LINCOEF

NExS User's Guide, Version 1.4.5
Grey Trout Software
11 April 1999