Interpolation of a time-series AO


Interpolating

1. Interpolation of a sequence of random data at original sampling rate of 1 Hz by a factor of 10 with no initial phase.

	pl = plist('tsfcn','sin(2*pi*1.733*t)','fs',1,'nsecs',10,'yunits','V');
	x = ao(pl);
	% Interpolate on a new time vector
	t = linspace(0, x.data.nsecs - 1/x.data.fs, 2*len(x));
	pl_spline  = plist('vertices',t);        
	pl_nearest = plist('vertices',t,'method','nearest');
	x_spline   = interp(x,pl_spline);
	x_nearest  = interp(x,pl_nearest);
	iplot([x x_spline x_nearest], plist('Markers', {'x', 'o', '+'}, 'LineColors', {'k', 'r'}));

 
Interpolate




©LTP Team