%
%  cubic_spline_function.m  ver 1.0  July 12, 2012
%
%  by Tom Irvine
%
function[xx,yy,dt]=cubic_spline_function(x,y)
%
disp(' ');
disp(' Enter new sample rate (samples/sec)');
sr=input(' ');
dt=1/sr;
%
n=length(x);
%
np=round((x(n)-x(1))/dt);
np=np+1;
%
xx=linspace(x(1),x(n),np); 
%
out1=sprintf('\n number of interpolated points = %d \n',length(xx));
disp(out1);
%
yy = spline(x,y,xx);