Lagrange Interpolator Polynomial
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.
Citar como
Dan Ellis (2026). Lagrange Interpolator Polynomial (https://la.mathworks.com/matlabcentral/fileexchange/13151-lagrange-interpolator-polynomial), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- AI and Statistics > Curve Fitting Toolbox > Interpolation >
- MATLAB > Mathematics > Elementary Math > Polynomials >
Etiquetas
Agradecimientos
Inspirado por: Lagrange polynomial interpolation, lagrange interpolation and derivative
Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
lagrangepoly/
lagrangepoly/html/
| Versión | Publicado | Notas de la versión | |
|---|---|---|---|
| 1.0.0.0 | - added example to comments as per code metrics report
|
