13
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="median">
15
<refname>median</refname>
16
<refpurpose>median (row median, column median,...) of
17
vector/matrix/array entries
21
<title>Calling Sequence</title>
30
<title>Arguments</title>
35
<para>real vector, matrix or an array</para>
41
<para>scalar,vector, matrix or an array</para>
47
<para>positive integer</para>
53
<title>Description</title>
55
For a vector or a matrix <literal>x</literal>, <literal>y=median(x)</literal>
56
returns in the scalar <literal>y</literal> the median of all the entries of
60
<literal>y=median(x,'r')</literal> (or, equivalently,
61
<literal>y=median(x,1)</literal>) is the median along the row index. It returns
62
in each entry of the column vector <literal>y</literal> the median of each
63
column of <literal>x</literal>.
66
<literal>y=median(x,'c')</literal> (or, equivalently,
67
<literal>y=median(x,2)</literal>) is the median along the column index. It
68
returns in each entry of the row vector <literal>y</literal> the median of each
69
row of <literal>x</literal>.
72
<literal>y=median(x,'m')</literal> is the median along the first non
73
singleton dimension of <literal>x</literal> (for compatibility with matlab).
76
<literal>y=median(x,dim)</literal> is the median along the dimension
77
<literal>dim</literal> of <literal>x</literal> (for compatibility with matlab).
81
<title>Examples</title>
82
<programlisting role="example"><![CDATA[
15
<refname>median</refname>
16
<refpurpose>median (row median, column median,...) of
17
vector/matrix/array entries
21
<title>Calling Sequence</title>
30
<title>Arguments</title>
35
<para>real vector, matrix or an array</para>
41
<para>scalar,vector, matrix or an array</para>
47
<para>positive integer</para>
53
<title>Description</title>
55
For a vector or a matrix <literal>x</literal>, <literal>y=median(x)</literal>
56
returns in the scalar <literal>y</literal> the median of all the entries of
60
<literal>y=median(x,'r')</literal> (or, equivalently,
61
<literal>y=median(x,1)</literal>) is the median along the row index. It returns
62
in each entry of the column vector <literal>y</literal> the median of each
63
column of <literal>x</literal>.
66
<literal>y=median(x,'c')</literal> (or, equivalently,
67
<literal>y=median(x,2)</literal>) is the median along the column index. It
68
returns in each entry of the row vector <literal>y</literal> the median of each
69
row of <literal>x</literal>.
72
<literal>y=median(x,'m')</literal> is the median along the first non
73
singleton dimension of <literal>x</literal> (for compatibility with matlab).
76
<literal>y=median(x,dim)</literal> is the median along the dimension
77
<literal>dim</literal> of <literal>x</literal> (for compatibility with matlab).
81
<title>Examples</title>
82
<programlisting role="example"><![CDATA[
83
83
A=[1,2,10;7,7.1,7.01];