
% FILE hlp123.m begins.
% Plot curve through points (x(k),y(k)) 
x=[0  0.7     1 1.2  1  0.5  0 0];
y=[0  -0.5    0 0.4  1.1   0.8    1.2 0];
m=length(x);
%  x(1)=x(m), y(1)=y(m)
xi =1:0.05:m;  % the points x are parametrized by integers 1:m
                          % xi is refined paramter values
pi=interp1(1:m,x,xi,'pchip'); 
qi=interp1(1:m,y,xi,'pchip'); 
plot(x,y,'ko',pi,qi,'k-')
axis([-0.5  1.5  -0.6  1.5])
% FILE hlp123.m ends.
