(Solved) : Get Answer Part B Attached Question Knowing Following Matlab Code Used Part Clc Clears Sc Q36118537 . . .
Can I get the answer to part (b) of the attached question,knowing that the following MATLAB code is used to do part (a).
clc; % Clears the screen
clear all;
x=-5:5/6:5;
y=1./(1+x.^2);
for i=1:length(x)-1
xx=x(i):0.01:x(i+1);
yy=interp1([x(i),x(i+1)],[y(i),y(i+1)],xx);
plot(xx,yy,’b’);
hold on;
end

PS: i need it ASAP if possible
Kind regards
1. Use MATLAB to fit various piecewise polynomials to the Runge function 1+r2 at equally-spaced points between -5 and 5. (You can set the points with the com- mands x = [-5 : 5/6 : 5].) a. Compute the piecewise linear interpolant of f(x). (You may use MATLAB routine interpl or write your own routine.) b. Compute the piecewise cubic Hermite interpolant P(x) of f(x). (Write your own routine for this.) Show transcribed image text
Expert Answer
Answer to Get Answer Part B Attached Question Knowing Following Matlab Code Used Part Clc Clears Sc Q36118537 . . .
OR