mad
              "all")Compute the mean or median absolute deviation (MAD).
 mad (x) returns the mean absolute deviation of the values in
 x.  mad treats NaNs as missing values and removes them.
mad returns the mean or median absolute
 deviation of the values in X.
 mad returns the mean or median absolute
 deviation of each column of X.
 mad (x) operates
 along the first non-singleton dimension of x.
  mad (x, flag) specifies whether to compute the mean
 absolute deviation (flag = 0, the default) or the median absolute
 deviation (flag = 1). Passing an empty variable, defaults to 0.
 mad (x, flag,  returns the MAD of all the
 elements in x.
"all")
 The optional variable dim forces mad to operate over the
 specified dimension, which must be a positive integer-valued number.
 Specifying any singleton dimension in x, including any dimension
 exceeding ndims (x), will result in a MAD equal to
 zeros (size (x)), while non-finite elements are returned as NaNs.
 mad (x, flag, vecdim) returns the MAD over the
 dimensions specified in the vector vecdim.  For example, if x
 is a 2-by-3-by-4 array, then mad (x, [1 2]) returns a
 1-by-1-by-4 array.  Each element of the output array is the median of the
 elements on the corresponding page of x.  If vecdim indexes all
 dimensions of x, then it is equivalent to mad (x, "all").
 Any dimension in vecdim greater than ndims (x) is ignored.
Source Code: mad