


medAbsDev calculates the median absolute deviation
Usage: D = medAbsDev(X, DIM)
or: [D, M] = medAbsDev(X, DIM)
Input: X : data
DIM: dimension along which mad should be calculated (1=columns, 2=rows)
(optional, default=first dimension with more than 1 element
Output: D : median absolute deviations
M : medians (optional)