lineThroughOrigin function

double lineThroughOrigin(
  1. List<double> x,
  2. List<double> y
)

Least-Squares fitting the points (x,y) to a line through origin y : x -> b*x, returning its best fitting parameter b, where the intercept is zero and b the slope.

Implementation

double lineThroughOrigin(List<double> x, List<double> y) =>
    fitThroughOrigin(x, y);