x=1:10;
y=[3.56 2.56 1.54 0.53 0.26 0.90 1.81 2.12 1.53 0.56];
pp1=csape(x,y,\'second\',[1 2]);
cc1=ppval(pp1,x);
pp2=csape(x,y,\'complete\',[1 2]);
cc2=ppval(pp2,x);
pp3=csape(x,y,\'not-a-knot\');
cc3=ppval(pp3,x);
pp4=csape(x,y,\'periodic\');
cc4=ppval(pp4,x);
subplot(2 2 1)plot(x,cc1,\'r\');
subplot(2 2 2)plot(x,cc2,\'r\');
subplot(2 2 3)plot(x,cc3,\'r\');
subplot(2 2 4)plot(x,cc4,\'r\');
|