Name

lsqe

Synopsis

void lsqe(const double *x, const double *y, int n, double *b1, double *b0);

Return Value

None.

Description

Uses least-squares estimation to obtain b 1 and b 0 in y (x) = b 1 x + b 0 so that y (x) is a best-fit line through a set of points. The x-coordinates of the points are specified in x. The y-coordinates are specified in y. The number of points is specified in n. The operation returns the appropriate values in b1 and b0.

Complexity

O (n), where n is the number of points used in determining b 1 and b 0.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset