Linefitval

Parent Previous Next

Linefitval


Least square straight line curve fitting value


Syntax


linefit(x, y, t)

x,y are vectors of the same size, t is scalar

The input vectors x, y contains the data points for the curve fitting. Each data point is given by (x[i], y(i)). linefitval(x,y,t) return a scalar which is evaluated by the the straight line fitting function on a independent point t.


Example


Input

Output

x = linspace(0, 2*PI/10.0)

y = sin(x)

linefitval(x,y, 5*2*PI/10.0)


See Also


Created with the Personal Edition of HelpNDoc: Full-featured Help generator