FUNCTION REFERENCE

trimmean

Mean after removing an equal proportion from each tail.

Mean after removing an equal proportion from each tail.

Syntax

m = trimmean(x,percent[,flag[,dim_or_all]])

NaNs are removed before sorting each sample. k=n*percent/200 observations are trimmed per tail. Flag round (default) rounds k half away from zero; floor rounds downward; weighted retains fractional boundary weights. Matrices reduce by column unless dim is 1 or 2; 'all' combines observations.

Example

trimmean([1 2 3 4 100],40,'weighted')

Differences from MATLAB: vector dimensions are not supported yet. The half-integer rounding convention is explicitly half away from zero.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.