Question: Determine a cubic spline f : [0, 3] R such that f(xi) = yi , for i = 1, 2, 3, (x1, x2, x3) =
Determine a cubic spline f : [0, 3] R such that
f(xi) = yi , for i = 1, 2, 3, (x1, x2, x3) = (0, 2, 3), (y1, y2, y3) = (0, 1, 2);
f [xi,xi+1] is polynomial of degree less or equal to three for i = 1, 2;
f, f ' , f '' are continuous in (0, 3);
f ' (0+) = 0, f ' (3-) = 0.
This can be done constructing a system of linear equations and solving it in Matlab. Plot your solution and compare it to the output of the Matlab function spline:
x = [0 2 3];
y = [0 0 1 2 0];
cs = spline(x, y);
plot(linspace(0,3),ppval(cs,linspace(0,3)),-r);
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
