Home > freetb4matlab > statistics > trimmean.m

trimmean

PURPOSE ^

%

SYNOPSIS ^

function a = trimmean(x, p, varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{a} =} trimmean (@var{x}, @var{p})
%
% Compute the trimmed mean.
%
% The trimmed mean of @var{x} is defined as the mean of @var{x} excluding the
% highest and lowest @var{p} percent of the data.
%
% For example
%
% @example
% mean ([-inf, 1:9, inf])
% @end example
%
% is NaN, while
%
% @example
% trimmean ([-inf, 1:9, inf], 10)
% @end example
%
% excludes the infinite values, which make the result 5.
%
% @seealso{mean}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003