duration

Methods

Method Reference: duration.mad

duration: M = mad (D)
duration: M = mad (D, opt)
duration: M = mad (D, opt, dim)
duration: M = mad (D, opt, vecdim)
duration: M = mad (D, opt, 'all')

Compute the mean or median absolute deviation of a duration array.

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

Source Code: duration

Example: 1

mad returns the mean absolute deviation of the durations — another robust spread statistic.

 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
 mad (d)
ans =
  duration

   1.71429 hr