Main Content

idresamp

Resample time-domain data by decimation or interpolation

Syntax

datar = idresamp(data,R)
datar = idresamp(data,R,order,tol)
[datar,res_fact] = idresamp(data,R,order,tol)

Description

datar = idresamp(data,R)resamples data on a new sample intervalRand stores the resampled data asdatar.

datar = idresamp(data,R,order,tol)filters the data by applying a filter of specifiedorderbefore interpolation and decimation. ReplacesRby a rational approximation that is accurate to a tolerancetol.

[datar,res_fact] = idresamp(data,R,order,tol)returnsres_fact, which corresponds to the value ofRapproximated by a rational expression.

Input Arguments

data

Name of time-domainiddataobject 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>1results in decimation andR<1results 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 largerPandQvalues, which produces more accurate answers at the expense of slower computation.

Default:0.1

Output Arguments

datar

Name of the resampled data variable.datarclass matches thedataclass, as specified.

res_fact

Rational approximation for the specified resampling factorRand tolerancetol.

Any positive number you specify is replaced by the rational approximation,Q/P, where the data is interpolated by a factorPand then decimated by a factorQ.

See Also

Introduced in R2007a