Lagrange interpolation polynomial fitting with MATLAB

版本 1.1.0.0 (2.3 KB) 作者: Tamir Suliman
Lagrange interpolation polynomial fitting
591.0 次下载
更新时间 2023/3/23

查看许可证

Lagrange interpolation polynomial fitting a set of points LAGRANG(X,Y,N,XX) where X and Y are row vector defining a set of N points uses Lagrange's method to find the N th order polynomial in X that passes through these points.
This program calculates and plots the Lagrange interpolation polynomial for a given set of data points. The Lagrange interpolation is a method to find an (n-1)th order polynomial that passes through n data points (x, y).
The input parameters for the program are:
  1. x: A row vector containing the x-coordinates of the data points.
  2. y: A row vector containing the y-coordinates of the data points.
  3. n: The number of data points.
  4. xx: A specific x-value to evaluate the interpolation polynomial.

引用格式

Tamir Suliman (2024). Lagrange interpolation polynomial fitting with MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/60686-lagrange-interpolation-polynomial-fitting-with-matlab), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2016b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Polynomials 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Lagrang

版本 已发布 发行说明
1.1.0.0

* Moved the function description to the first line as a comment block.
* Added semicolons to suppress unnecessary output.
* Used 'ro' and 'b-' in the plot function to distinguish the original points

1.0.0.0

updated figure
comments section