At Westonci.ca, we make it easy for you to get the answers you need from a community of knowledgeable individuals. Explore thousands of questions and answers from knowledgeable experts in various fields on our Q&A platform. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.
Sagot :
The f(4) using is found using newton's interpolating polynomials of order 4.
function y=CL10_Exercise(part)
%% Input
% part: string for part a,b,c,d
%
%% Output
% y value of the underlying function at x=4
%
%% Write your code here
X=[1,2,3,5,6];
Y=[15,8,5.5,30,52];
x=4;
y=1;
switch part
case 'a'
%% Newton interpolation (Order 4)
a=X;
b=Y;
%x=input('Enter x: ');
[m,n]=size(a);
fx=0;
for i=1:n
%_____________Calculating Dividing Difference_____________________
s=0;
for j=1:i
p=1;
for k=1:i %Denominator part product
if(k~=j)
p=p*(a(j)-a(k));
end
end
s=s+b(j)/p; %summation f(x)/product
end
%_________________________________________________________________
p=1;
for j=1:i-1 %coefficient part of f[...]
p=p.*(x-a(j));
end
fx=fx+s.*p; %Polynomial!
end
y=fx;
case 'b'
%% not-a-knot spline
case 'c'
%% clamped spline
case 'd'
%% Hermite spline
end
end
Hence, the f(4) using is found using newton's interpolating polynomials of order 4.
To learn more about interpolation click here:
brainly.com/question/18768845
#SPJ4
We hope this information was helpful. Feel free to return anytime for more answers to your questions and concerns. We appreciate your time. Please come back anytime for the latest information and answers to your questions. We're glad you visited Westonci.ca. Return anytime for updated answers from our knowledgeable team.