Home > freetb4matlab > statistics > prctile.m

prctile

PURPOSE ^

% Computes the value associated with the @var{p}-th percentile of

SYNOPSIS ^

function a = prctile(x, p, dim)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File}  {@var{a} =} prctile (@var{x}, @var{p})
% @deftypefnx {Function File}  {@var{a} =} prctile (@var{x}, @var{p}, @var{dim})
% Computes the value associated with the @var{p}-th percentile of
% @var{x}. If @var{x} is a matrix, computes @var{p} for each column of
% @var{x}. If @var{p} is a vector, the returned value is a matrix with
% one row for each element of @var{p} and one column for each column of
% @var{x}. If @var{x} is a vector, then @var{y} is a vector with the
% same size as @var{p}. If the argument @var{dim} is given, operate
% along this dimesnion rather than the columns of the matrix.
%
% The first and last values are pegged at 0 percent and 100 percent
% respectively, and the rest of the values are uniformly spaced between
% them, with linear interpolation between the points.  This is
% consistent with the definition of quantile given in the R statistics
% package, but inconsistent with that of the statistics toolbox from
% Matlab.
% @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