Fits a line to a series.
TREND(series)
series |
- |
A series. |
A series.
W1: integ(gnorm(1000, 1))
W2: trend(W1);overp(W1)
W3: xy(W1, integ(W1))
W4: trend(W3);overp(W3)

W2 contains the least squares best linear fit of the data in W1. The result is plotted with the original data.
W4 contains the best linear fit to the XY data in W3. The result is plotted with the original data.
(fit, coeff) = trend(s) returns both the resulting fit and the linear coefficients {a0, a1} of the equation
See DETREND to remove a linear trend from a series.