% A parametric cubic spline for a figure (script L) in 2D
% K. Ming Leung, 03/08/03

x=[27 45   58.5 64.4 60 55 46 36 29 18 8 6.2 10 18 33 56 70]';
y=[50 48.5 51   55.5 58 57 53 43 27 12 8 12  19 22 17  8 7.5]';
t=1:length(x); ,nPlotPts=10;

[tPlot1, xPlot] = cubicSplineNaturalF(t,x,nPlotPts); 
[tPlot2, yPlot] = cubicSplineNaturalF(t,y,nPlotPts);
plot(xPlot,yPlot,'lineWidth',2); 
axis equal; axis([0 75 0 60]); hold on;
plot(x,y,'r.','markerSize',14);
ylabel('y','FontSize',18);
xlabel('x','FontSize',18); 
title('Parametric Cubic Spline in Two-Dimension','FontSize',24);