Question: program 4.2: function [C,D] = newpoly( X,Y ) %UNTITLED2 Summary of this function goes here % Detailed explanation goes here n=length(X); D=zeros(n,n); D(:,1)=Y'; for j=2:n

program 4.2:

function [C,D] = newpoly( X,Y )

%UNTITLED2 Summary of this function goes here

% Detailed explanation goes here

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

end

i need question 2 parts a and b that depend on the question below , program 4.2 and algorithm

program 4.2: function [C,D] = newpoly( X,Y ) %UNTITLED2 Summary of thisfunction goes here % Detailed explanation goes here n=length(X); D=zeros(n,n); D(:,1)=Y'; forj=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); this question that i want the solution for

2. The measured temperatures duning a 5-hour period in a suburb of Lus Augeles on (a) Use Program 4.1 to construct a Lagrange interpolatory polynomial for the data (b) Use Algorithm 4.1(ii) to estimate the average temperature during the given (c) Graph the data in the table and the polynomial from part (a) on the sae codi November 8 are given in the following table. in the table. 5-hour period. nate system. Discuss the possible error that can result from using the polynomial in part (a) to estimate the average temperature. Time, PM.Degrees Fahrenheit 2 3 4 65 64 63 63 2. The measured temperatures duning a 5-hour period in a suburb of Lus Augeles on (a) Use Program 4.1 to construct a Lagrange interpolatory polynomial for the data (b) Use Algorithm 4.1(ii) to estimate the average temperature during the given (c) Graph the data in the table and the polynomial from part (a) on the sae codi November 8 are given in the following table. in the table. 5-hour period. nate system. Discuss the possible error that can result from using the polynomial in part (a) to estimate the average temperature. Time, PM.Degrees Fahrenheit 2 3 4 65 64 63 63

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 Databases Questions!