Lagrange Interpolator Polynomial (Scripts) Publisher's description
from Dan Ellis
The two inputs X and Y are vectors defining a set of N points
The two inputs X and Y are vectors defining a set of N points. The function uses Lagrange's method to find the N-1th order polynomial that passes through all these points, and returns in P the N coefficients defining that polynomial. Then, polyval(P,X) = Y.
R returns the x co-ordinates of the N-1 extrema/inflection points of the resulting polynomial (roots of its derivative), and S returns the value of the polynomial at those points.
For a general-purpose way to find a smooth curve connecting points, you probably want to use SPLINE instead.
System Requirements:MATLAB 7.3 (R2006b)
Program Release Status: New Release
Program Install Support: Install and Uninstall