Resample time-domain data by decimation or interpolation
datar = idresamp(data,R)
datar = idresamp(data,R,order,tol)
[datar,res_fact] = idresamp(data,R,order,tol)
datar = idresamp(data,R)
resamples data on a new sample intervalR
and stores the resampled data asdatar
.
datar = idresamp(data,R,order,tol)
filters the data by applying a filter of specifiedorder
before interpolation and decimation. ReplacesR
by a rational approximation that is accurate to a tolerancetol
.
[datar,res_fact] = idresamp(data,R,order,tol)
returnsres_fact
, which corresponds to the value ofR
approximated by a rational expression.
data
Name of time-domainiddata
object or a matrix of data. Can be input-output or time-series data.
Data must be sampled at equal time intervals.
R
Resampling factor, such thatR>1
results in decimation andR<1
results in interpolation.
Any positive number you specify is replaced by the rational approximation,Q/P
.
order
Order of the filters applied before interpolation and decimation.
Default:8
tol
Tolerance of the rational approximation for the resampling factorR
.
Smaller tolerance might result in largerP
andQ
values, which produces more accurate answers at the expense of slower computation.
Default:0.1
datar
Name of the resampled data variable.datar
class matches thedata
class, as specified.
res_fact
Rational approximation for the specified resampling factorR
and tolerancetol
.
Any positive number you specify is replaced by the rational approximation,Q/P
, where the data is interpolated by a factorP
and then decimated by a factorQ
.