Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1084
Number of posts: 1765

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Newton's interpolation formula Posted by m4thias on 4 Dec 2009 at 3:23 PM
Hello,
could someone help me with my exam? This is it: Using Newton's interpolation formula plot a graph of the polynomial interpolation maximum level at a specified interval you specify points, while the input data containing the coordinates. This is exam in Matlab, i can what this program have to do, but I can't programming it :( Please, is there someone who can help me? I sitting on this whole week but i can't solve it.
Report
Re: Newton's interpolation formula Posted by m4thias on 5 Dec 2009 at 8:11 AM
I have a source code for newton's interpolation formula, but I can't make a graph

function fp = newton_interpolation(x,y,p)
n = length(x);
a(1) = y(1);
for k = 1 : n - 1
d(k, 1) = (y(k+1) - y(k))/(x(k+1) - x(k));
end
for j = 2 : n - 1
for k = 1 : n - j
d(k, j) = (d(k+1, j - 1) - d(k, j - 1))/(x(k+j) - x(k));
end
end
d
for j = 2 : n
a(j) = d(1, j-1);
end
Df(1) = 1;
c(1) = a(1);
for j = 2 : n
Df(j)=(p - x(j-1)) .* Df(j-1);
c(j) = a(j) .* Df(j);
end
fp=sum(c);



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.