forecast_linear
Predict a y value from linear regression at a single x.
Syntax
Section titled “Syntax”v = forecast_linear(x, knownys, knownxs)Description
Section titled “Description”Returns the y value predicted by linear regression of (knownxs, knownys) evaluated at x. Equivalent to one application of trend with a scalar newxs.
Example
Section titled “Example”forecast_linear(5, [2 4 6 8], [1 2 3 4]) % 10