trimmean
Trimmed mean (mean excluding outliers).
Syntax
Section titled “Syntax”v = trimmean(array, percent)Description
Section titled “Description”Returns the mean of array after excluding the percent proportion of values from each tail (so percent = 0.2 excludes the top 10% and bottom 10%). percent must be in [0, 1). Robust to outliers.
Example
Section titled “Example”trimmean([1 2 3 4 5 6 7 8 9 100], 0.2) % 5.5 (excludes 1 and 100)