5.0

5.0 | 1 rating Rate this file 10 Downloads (last 30 days) File Size: 2.33 KB File ID: #4478
image thumbnail

Barycentric Lagrange Interpolating Polynomials and Lebesgue Constant

by Greg von Winckel

 

13 Feb 2004 (Updated 08 Mar 2004)

Computes lagrange interpolating polynomials and Lebesgue function/constant.

| Watch this File

File Information
Description

The first script, barylag.m, performs a barycentric lagrange interpolation on a for a set of given data. This approach follows from a paper by L. N. Trefethen (ref inside script comments), and is much faster than the previous script. Additionally, it has been vectorized to improve computation time even more. The second script, lebesgue.m is for computing the lebesgue function and constant for a set of nodes. If you want to interpolate data using barylag but are using some unusual set of nodes, use the second script to check the lebesgue constant ensure good numerical conditioning.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Lagrange polynomial interpolation

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
06 Oct 2006 Orlando Rodríguez

An excellent piece of code: very compact, fast and efficient. It is also an excellent example of Matlab's vectorizing capabilities to avoid using "for" loops.

Please login to add a comment or rating.
Updates
08 Mar 2004

The script has been made into two scripts, a barycentric lagrange interpolation scheme which is much faster, and a lebesgue calculator for theoretical interest.

Tag Activity for this File
Tag Applied By Date/Time
approximation Greg von Winckel 22 Oct 2008 07:14:19
interpolation Greg von Winckel 22 Oct 2008 07:14:19
barycentric lagrange interpolating polynomial Greg von Winckel 22 Oct 2008 07:14:19
nodes Greg von Winckel 22 Oct 2008 07:14:20
lebesgue Greg von Winckel 22 Oct 2008 07:14:20

Contact us at files@mathworks.com