Indenting scicos_simulate and xcos_simulate
[scilab.git] / scilab / modules / statistics / help / en_US / descriptive_statistics / median.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2000 - INRIA - Carlos Klimann
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
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" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="median">
14     <refnamediv>
15         <refname>median</refname>
16         <refpurpose>median (row median, column median,...) of
17             vector/matrix/array entries
18         </refpurpose>
19     </refnamediv>
20     <refsynopsisdiv>
21         <title>Calling Sequence</title>
22         <synopsis>y=median(x)
23             y=median(x,'r')
24             y=median(x,'c')
25             y=median(x,'m')
26             y=median(x,dim)
27         </synopsis>
28     </refsynopsisdiv>
29     <refsection>
30         <title>Arguments</title>
31         <variablelist>
32             <varlistentry>
33                 <term>x</term>
34                 <listitem>
35                     <para>real vector, matrix or an array</para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>y</term>
40                 <listitem>
41                     <para>scalar,vector, matrix or an array</para>
42                 </listitem>
43             </varlistentry>
44             <varlistentry>
45                 <term>dim</term>
46                 <listitem>
47                     <para>positive integer</para>
48                 </listitem>
49             </varlistentry>
50         </variablelist>
51     </refsection>
52     <refsection>
53         <title>Description</title>
54         <para>
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
57             <literal>x</literal>.
58         </para>
59         <para>
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>.
64         </para>
65         <para>
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>.
70         </para>
71         <para>
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).
74         </para>
75         <para>
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).
78         </para>
79     </refsection>
80     <refsection>
81         <title>Examples</title>
82         <programlisting role="example"><![CDATA[ 
83 A=[1,2,10;7,7.1,7.01];
84 median(A)
85 median(A,'r')
86 median(A,'c')
87 A=matrix([-9 3 -8 6 74 39 12 -6 -89 23 65 34],[2,3,2]);
88 median(A,3)
89 median(A,'m')
90  ]]></programlisting>
91     </refsection>
92     <refsection role="see also">
93         <title>See Also</title>
94         <simplelist type="inline">
95             <member>
96                 <link linkend="sum">sum</link>
97             </member>
98             <member>
99                 <link linkend="mean">mean</link>
100             </member>
101         </simplelist>
102     </refsection>
103 </refentry>