Skip to Main Content Skip to Search
Product Documentation

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 interval R and stores the resampled data as datar.

datar = idresamp(data,R,order,tol) filters the data by applying a filter of specified order before interpolation and decimation. Replaces R by a rational approximation that is accurate to a tolerance tol.

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

Input Arguments

data

Name of time-domain iddata 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 that R>1 results in decimation and R<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 factor R.

Smaller tolerance might result in larger P and Q values, which produces more accurate answers at the expense of slower computation.

Default: 0.1

Output Arguments

datar

Name of the resampled data variable. datar class matches the data class, as specified.

res_fact

Rational approximation for the specified resampling factor R and tolerance tol.

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

See Also

resample

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS