System Identification Toolbox | ![]() ![]() |
Resample data by interpolation and decimation.
Syntax
Description
data
: The data to be resampled, given as an iddata
object
datar
: The resampled data returned as an iddata
object
P,Q: Integers that determine the resampling factor. The new sampling interval will be Q/P
times the original one, so resample(z,1,Q)
means decimation with a factor Q
.
filter_order
: Determines the order of the presampling filters used before interpolation and decimation. Default is 10.
Algorithm
If the Signal Processing Toolbox is available, the resampling is achieved by calls to the resample
function in that toolbox. The intersample character of the input, as described by data.InterSample
, is taken into account.
Otherwise, the data are interpolated by a factor P
and then decimated by a factor Q
. The interpolation and decimation are preceded by prefiltering, and follow the same algorithms as in the routines interp
and decimate
in the Signal Processing Toolbox.
Examples
Resample by a increasing the sampling rate a factor1.5 and compare the signals.
![]() | rbj | resid | ![]() |