Skip to content

trend

Linear-trend predictions.

v = trend(knownys, knownxs, newxs, const)

Computes a linear regression on (knownxs, knownys) and returns predicted y values for newxs. With const = false, forces the intercept to zero.

trend([2 4 6 8], [1 2 3 4], [5 6 7]) % [10 12 14]
  • growth — Exponential-trend predictions.
  • linest — Linear regression coefficients (with optional statistics).
  • forecast_linear — Predict a y value from linear regression at a single x.