Resample time-domain data by decimation or interpolation (requires Signal Processing Toolbox software)
resample(data,P,Q) resamples data such
that the data is interpolated by a factor
then decimated by a factor
in decimation by a factor
resample(data,P,Q,order) filters the data
by applying a filter of specified
interpolation and decimation.
Name of time-domain
iddataobject. Can be input-output or time-series data.
Data must be sampled at equal time intervals.
Integers that specify the resampling factor, such that the new sample time is
Q/Ptimes the original one.
(Q/P)>1results in decimation and
(Q/P)<1results in interpolation.
Order of the filters applied before interpolation and decimation.
Resample Time-Domain Data
Increase the sampling rate of data by a factor of 1.5 and compare the resampled and the original data signals.
u = idinput([20 1 2],'sine',,,[5 10 1]); u = iddata(,u,1); plot(u) ur = resample(u,3,2); plot(u,ur)
If you have installed the Signal Processing Toolbox™ software,
the Signal Processing Toolbox
The algorithm takes into account the intersample characteristics of
the input signal, as described by