Help check: validate the help files on compilation against a derivated docbook schema
[scilab.git] / scilab / modules / elementary_functions / help / en_US / matrixmanipulation / repmat.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) 2011 - INRIA - Serge Steer
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:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="repmat" xml:lang="en">
14   <info>
15     <pubdate>$LastChangedDate: 2011-01-12  (mer, 12 jan 2011)
16     $</pubdate>
17   </info>
18   <refnamediv>
19     <refname>repmat</refname>
20     <refpurpose>Replicate and tile an array</refpurpose>
21   </refnamediv>
22   <refsynopsisdiv>
23     <title>Calling Sequence</title>
24     <synopsis>B = repmat(A,m,n,...)</synopsis>
25     <synopsis>B = repmat(A,siz)</synopsis>
26     <synopsis>B = repmat(A,m)</synopsis>
27   </refsynopsisdiv>
28   <refsection>
29     <title>Arguments</title>
30     <variablelist>
31       <varlistentry>
32         <term>A</term>
33         <listitem>
34           <para>input 2D array.</para>
35         </listitem>
36       </varlistentry>
37       <varlistentry>
38         <term>m, n, ...</term>
39         <listitem>
40           <para>integers, number of <literal>A</literal> blocks for
41           each dimension of <literal>B</literal>.</para>
42         </listitem>
43       </varlistentry>
44       <varlistentry>
45         <term>siz</term>
46         <listitem>
47           <para>vector of integer, each element gives the number of
48           <literal>A</literal> blocks for corresponding dimension of
49           <literal>B</literal>.</para>
50         </listitem>
51       </varlistentry>
52       <varlistentry>
53         <term>B</term>
54         <listitem>
55           <para>resulting array form by tiling the <literal>A</literal> 2D array.</para>
56         </listitem>
57       </varlistentry>
58     </variablelist>
59   </refsection>
60   <refsection>
61     <title>Description</title>
62     <para><literal>repmat(A,m,n)</literal> or similarily
63     <literal>repmat(A,[m,n])</literal> returns a large matrix
64     consisting of an <literal>m</literal>-by- <literal>n</literal>
65     tiling of copies of <literal>A</literal>. The size of the result
66     is <literal>[size(A,1)*M, size(A,2)*N]</literal>.</para>
67     <para><literal>repmat(A,m)</literal> creates an
68     <literal>m</literal>-by- <literal>m</literal>tiling.</para>
69     <para><literal>repmat(A,[m n p ...])</literal> tiles the array A to produce a 
70     multidimensional array  composed of copies of  <literal>A</literal>. The size of the result is 
71     <literal>[size(A,1)*M, size(A,2)*N, size(A,3)*P, ...] </literal>.</para>
72     <para>For now,only arrays of real, integer, boolean, character
73     string, polynomial and rational as well as sparse matrices are
74     supported. This function definition can be extended using
75     overloading mechanism.</para>
76   </refsection>
77   <refsection>
78     <title>Examples</title>
79     <programlisting role="example"><![CDATA[ 
80     repmat(1:3,2,2)
81     repmat(int8([1 0 1;0 1 0]),2,3,2)
82     repmat("Scilab",3,2)
83     t="Scilab";t(ones(3,2))
84     repmat([1/%s;2/(%s+1)],1,3)
85
86  ]]></programlisting>
87   </refsection>
88   <refsection>
89     <title>See Also</title>
90     <simplelist type="inline">
91       <member>
92         <link linkend="matrix">matrix</link>
93       </member>
94       <member>
95         <link linkend="extraction">extraction</link>
96       </member>
97       <member>
98         <link linkend="size">size</link>
99       </member>
100     </simplelist>
101   </refsection>
102   <refsection>
103     <title>Authors</title>
104     <para>Serge Steer, INRIA</para>
105   </refsection>
106 </refentry>