LTPDA Toolbox™ | contents | ![]() ![]() |
Interpolation of data can be done in the LTPDA Toolbox by means of interp. This function interpolates the values in the input AO(s) at new values specified by the input parameter list.
Interp overloads interp1 function of Matlab Signal Processing Toolbox for AOs.
b = interpolate(a, pl)
The following parameters can be set in the method:
1. Interpolation of a sequence of random data at original sampling rate of 1 Hz by a factor of 10 with no initial phase.
% Signal generation 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'}));
![]() |
Resampling data | Spikes reduction in data | ![]() |
©LTP Team