% PROB4AONA6  Solve problem 4(a) on Assignment #6: compute and plot the spline.
x = [0.1, 0.2, 0.3];
y = [-0.29004996, -0.56079734, -0.81401972];
xp = 0.1:.0001:0.3;
yp = ncspline(x,y,xp);  % with line 54 uncommented, this produces coeffs [b c d]
set(0,'defaultlinelinewidth',2.0,'defaultlinemarkersize',12.0)
plot(x,y,'o',xp,yp), legend('data','natural cubic spline')
xlabel x, axis tight
