Lagrange's Polynomial Interpolation

Interpolates a scalar or vector yp = f(xp) with given x and y = f(x) vectors and xp query
40 Downloads
Aktualisiert 13. Jun 2021

Lizenz anzeigen

Lagrange's Polynomial Interpolation based on weighted factors or Lagrange polynomials with sum = 1.
Example data:
x = [1 4 6 5]; % x vector
y = log(x); % y = f(x) vector
xp = 2 or xp = [2 3]; % x point(s) (scalar or vector) query
Use:
yp = Lagrangeinterp(x,y,xp)
to calculate
yp = f(x point) point(s) (scalar or vector)
[~,L] = Lagrangeinterp(x,y,xp)
to output the Lagrange polynomial cell array

Zitieren als

Roche de Guzman (2024). Lagrange's Polynomial Interpolation (https://www.mathworks.com/matlabcentral/fileexchange/94065-lagrange-s-polynomial-interpolation), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2021a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0