| MATLAB Function Reference | ![]() |
ts_iqr = iqr(ts)
iqr(ts,'PropertyName1',PropertyValue1,...)
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:
'MissingData' property has two possible values, 'remove' (default) or 'interpolate', indicating how to treat missing data during the calculation.
'Quality' values are specified by a vector of integers, indicating which quality codes represent missing samples (for vector data) or missing observations (for data arrays with two or more dimensions).
'Weighting' property has two possible values, 'none' (default)
or 'time'.
When you specify 'time',
larger time values correspond to larger weights.
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
![]() | ipermute | is* | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |