Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is matlab. can you do it and send me codes thanks. Rules: you cannot use th

ID: 3349380 • Letter: T

Question

This is matlab. can you do it and send me codes thanks.



Rules: you cannot use the built in MATLAB spline function and you cannot look at or copy any code other than what is provided to you in this document Assume you are given a s interpolate the values of the data between the given points. For this data, the length is n 4 You will need n-1 3 estimation functions (1 between each set of data points) For cubic spline interpolation, these estimation functions look like: We can use the conditions for cubic spline interpolation covered in class to get the following set of linear equations (shown here in matrix form) 0 0 X1 0 0 0 0 0 0 0 -3x2-2x2 0 3x32x 3x22 2x2 2x21-1 | 0 | 0 | 0 0 0 6x22 6x32 0 6x2 2 06x X32 6x, 2 00 0 00 0 0 0 0 0 0 6x3 2

Explanation / Answer

x = [0 1 2.5 3.6 5 7 8.1 10];
y = sin(x);
xx = 0:.25:10;
yy = spline(x,y,xx);
plot(x,y,'o',xx,yy)
x = -4:4;
y = [0 .15 1.12 2.36 2.36 1.46 .49 .06 0];
cs = spline(x,[0 y 0]);
xx = linspace(-4,4,101);
plot(x,y,'o',xx,ppval(cs,xx),'-');
t = 1900:10:1990;
p = [ 75.995 91.972 105.711 123.203 131.669 ...
150.697 179.323 203.212 226.505 249.633 ];
spline(t,p,2000)
x = pi*[0:.5:2];
y = [0 1 0 -1 0 1 0;
1 0 1 0 -1 0 1];
pp = spline(x,y);
yy = ppval(pp, linspace(0,2*pi,101));
plot(yy(1,:),yy(2,:),'-b',y(1,2:5),y(2,2:5),'or')
axis equal
x = 0:.25:1;
Y = [sin(x); cos(x)];
xx = 0:.1:1;
YY = spline(x,Y,xx);
plot(x,Y(1,:),'o',xx,YY(1,:),'-')
hold on
plot(x,Y(2,:),'o',xx,YY(2,:),':')
hold off
x = 0:25;
y = besselj(1,x);
xq2 = 0:0.01:25;
p = pchip(x,y,xq2);
s = spline(x,y,xq2);
plot(x,y,'o',xq2,p,'-',xq2,s,'-.')
legend('Sample Points','pchip','spline')

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote