1 / 20

1.4 Newton Polynomial

This MATLAB function implements nested multiplication for constructing Newton's polynomial using given data points. The function `newpoly(X,Y)` takes in vectors X (nodal points) and Y (corresponding values) while calculating divided differences and coefficients. It initializes a matrix for divided differences, calculates through a nested loop, and constructs the polynomial using convolution for efficient evaluation. This approach is particularly useful in numerical analysis and interpolation tasks, ensuring high accuracy and simplicity in polynomial evaluation.

read
Télécharger la présentation

1.4 Newton Polynomial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 1.4 Newton Polynomial

  2. 1.4.1 Nested Multiplication

  3. function [C,D]=newpoly(X,Y) n=length(X); D=zeros(n,n); D(:,1)=Y'; for j=2:n for k=j:n D(k,j)=(D(k,j-1)-D(k-1,j-1))/(X(k)-X(k-j+1)); end end C=D(n,n); for k=(n-1):-1:1 C=conv(C,poly(X(k))); m=length(C); C(m)=C(m)+D(k,k); end

More Related