calculates the trimmed mean by removing the upper and lower
Q = nan_trimmean(Y,p) Q = nan_trimmean(Y,p,DIM)
returns the trimmean along dimension DIM of sample array Y.
If p is a vector, the trimmean for each p is computed.
nan_trimmean calculates the trimmed mean by removing the fraction of p/2 upper and p/2 lower samples. Missing values (encoded as NaN) are ignored and not taken into account. The same number from the upper and lower values are removed, and is compatible to various spreadsheet programs including GNumeric [1], LibreOffice, OpenOffice and MS Excel.
[1] http://www.fifi.org/doc/gnumeric-doc/html/C/gnumeric-trimmean.html