The question is to use Matlab to find the clamped cubic splinev(x) that interpolates a function f(x) that satisfies: f(0)=0,f(1)=0.5, f(2)=2, f(3)=1.5, f'(0)=0.2, f'(3)=-1 and then plotv(x).
This is my code so far:
x = [0 1 2 3];
y = [0 0.5 2 1.5];
cs = spline(x,[0 y 0]);
xx = linspace(0,3,101);
figure()
plot(x,y,'o',xx,ppval(cs,xx),'-');
IS THIS RIGHT? HOW CAN I GET MATLAB TO GIVE ME THE EQUATION OFv(x)?