Code covered by the BSD License  

Highlights from
Lagrange polynomial

Be the first to rate this file! 16 Downloads (last 30 days) File Size: 50.37 KB File ID: #26724
image thumbnail

Lagrange polynomial

by Ernesto Momox Beristain

 

18 Feb 2010

Lagrange form of the interpolation polynomial

| Watch this File

File Information
Description

% Polynomial Interpolation Problem: Lagrange Form
% x and y are vectors with the same dimensions
% Given n points: (x_k,y_k) k = 1,2,...n
% this function finds a polynomial P(x) of degree less
% than n such that P(x_k) = y_k
% --
% Remarks:
% The resulting polynomial is displayed in symbolic notation
% --
% Example
% x=[0 1 2 3 4 5 6 7];
% y=[4 -6 -1 16 -2 6 12 17];
% pol=show_polinterp(x,y);
% --
% x=[1 2 3 4 5 6 7];
% y=1+x.^3-x.^6;
% pol=show_polinterp(x,y);
%
% For evaluating pol, try
% subs(pol,x), it will return vector y
%--

Required Products Symbolic Math Toolbox
MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
lagrange Ernesto Momox Beristain 18 Feb 2010 12:18:51
polynomial Ernesto Momox Beristain 18 Feb 2010 12:18:51
interpolation Ernesto Momox Beristain 18 Feb 2010 12:18:51
symbolic Ernesto Momox Beristain 18 Feb 2010 12:18:51
mathematics Ernesto Momox Beristain 18 Feb 2010 12:18:51
interpolation David R. 23 Feb 2010 07:24:23
interpolation Michael 07 Jan 2011 10:41:06
lagrange Michael 07 Jan 2011 10:41:09
polynomial Michael 07 Jan 2011 10:41:11
interpolation Po-Chun 27 Nov 2011 00:25:36

Contact us at files@mathworks.com