duration

Methods

Method Reference: duration.iqr

duration: r = iqr (D)

duration: r = iqr (D, dim)

duration: r = iqr (D, vecdim)

duration: r = iqr (D, 'all')

duration: [r, q] = iqr (…)

Compute the interquartile range of a duration array.

This method overloads the core iqr function for duration arrays. The functionality is identical to core iqr function. Type help iqr for more information.

Source Code: duration

iqr returns the interquartile range (the 75th minus the 25th percentile), a robust measure of spread.

 d = hours ([2, 4, 4, 4, 5, 7, 9])
d =
  1x7 duration array

    2 hr    4 hr    4 hr    4 hr    5 hr    7 hr    9 hr
 iqr (d)
ans =
  duration

   2.5 hr