Polyfitval

Parent Previous Next

Polyfitval


Least square polynomial curve fitting value

Syntax


polyfit(x, y, m, t)

x,y are vectors of the same size, m is an positive integer and m>=2, t is a scalar

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


Example


Input

Output

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

y = sin(x)

polyfitval(x,y,8,15*2*PI/30.0)


See Also


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