iqr (timeseries) - Interquartile range of timeseries data

Syntax

ts_iqr = iqr(ts)
iqr(ts,'PropertyName1',PropertyValue1,...)

Description

ts_iqr = iqr(ts) returns the interquartile range of ts.Data. When ts.Data is a vector, ts_iqr is the difference between the 75th and the 25th percentiles of the ts.Data values. When ts.Data is a matrix, ts_iqr is a row vector containing the interquartile range of each column of ts.Data (when IsTimeFirst is true and the first dimension of ts is aligned with time). For the N-dimensional ts.Data array, iqr always operates along the first nonsingleton dimension of ts.Data.

iqr(ts,'PropertyName1',PropertyValue1,...) specifies the following optional input arguments:

Examples

Create a time series with a missing value, represented by NaN.

ts = timeseries([3.0 NaN 5 6.1 8], 1:5);

Calculate the interquartile range of ts.Data after removing the missing value from the calculation.

iqr(ts,'MissingData','remove')

ans =

    3.0500

See Also

timeseries

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS