Question: Using MatLab ) Find a polynomial to interpolate the data after that find f ( 3 . 5 ) . f ( x ) =

Using MatLab) Find a polynomial to interpolate the data after that find f(3.5).
f(x)
=b0+b1(x-x0)+b2(x-x0)(x-x1)+b3(x-x0)(x-x1)(x-x2)
+b4(x-x0)(x-x1)(x-x2)(x-x3)
and simular to the given code:
function coeffs= newtons_divided_difference(x,y)
%input:
%x: vector of x value
% y: vector of y value corresponding to x
% number of data of points
n=length(x)
%initialize the divided differnces table
F= zeros(n,n)
% fill in the first column with y values
F(:,1)=y;
% compute the divided differences
for j=2:n;
for i=1:n-j+1;
F(i,j)=(F(i+1, j-1)-F(i,j-1))/(x(i+j-1)-x(i));
end
end
% coefficients of the polynoimal
coeffs= F(1,:);
end
Using MatLab ) Find a polynomial to interpolate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!