Problem 1017. Lagrange Interpolation
Given a set of measurements of dependent variables in a vector, Y, that vary with one independent variable in a vector, X, calculate the interpolating polynomial using Lagrange interpolation. Output is the interpolated value for a given value of x, as well as the vector of Lagrange polynomial coefficients.
Solution Stats
Problem Comments
-
1 Comment
Could you please explain the output (the order of arrangement of coefficients, etc)? With my program I'm getting the right coefficients (tried from wikipedia, etc) but they don't match yours. Only the interpolated value matches!
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15715 Solvers
-
112 Solvers
-
Selecting books on MATLAB for experts and beginners (blindfolded)
78 Solvers
-
Replace all zeros and NaNs in a matrix with the string 'error'
101 Solvers
-
505 Solvers
More from this Author17
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!