%i_isreal() %i_real() %i_imag() added
[scilab.git] / scilab / modules / core / help / en_US / types / hypermat.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) 2007-2008 - INRIA
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <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="hypermat">
17     <refnamediv>
18         <refname>hypermat</refname>
19         <refpurpose>initializes an  N dimensional matrix. <emphasis role="bold">obsolete</emphasis>. Please use <link linkend="matrix">matrix</link>.
20         </refpurpose>
21     </refnamediv>
22     <refsynopsisdiv>
23         <title>Syntax</title>
24         <synopsis>M = hypermat(dims [,v])</synopsis>
25     </refsynopsisdiv>
26     <refsection>
27         <title>Arguments</title>
28         <variablelist>
29             <varlistentry>
30                 <term>dims</term>
31                 <listitem>
32                     <para>a vector of hypermatrix dimensions.</para>
33                 </listitem>
34             </varlistentry>
35             <varlistentry>
36                 <term>v</term>
37                 <listitem>
38                     <para>
39                         a vector of hypermatrix entries (default value <code>zeros(prod(dims),1)</code>).
40                     </para>
41                 </listitem>
42             </varlistentry>
43         </variablelist>
44     </refsection>
45     <refsection>
46         <title>Description</title>
47         <para>
48             The <function>hypermat</function> function initializes a hypermatrix whose dimensions are given in the vector <varname>dims</varname> and entries are given in optional argument <varname>v</varname>.
49         </para>
50         <para>
51             <varname>M</varname> data structure contains the vector of matrix dimensions
52             <code>M('dims')</code> and the vector of entries <code>M('entries')</code> such as
53             the leftmost subcripts vary first
54             <literal>[M(1,1,..);..;M(n1,1,..);...;M(1,n2,..);..;M(n1,n2,..);...]</literal>
55         </para>
56         <para>
57             <warning>
58                 If you build your own <function>hypermat</function>, you must be careful. The <code>M('dims')</code> entry must be a row vector whereas the <code>M('entries')</code> must be a column vector.
59             </warning>
60         </para>
61     </refsection>
62     <refsection>
63         <title>Examples</title>
64         <programlisting role="example"><![CDATA[
65 M = hypermat([2 3 2 2],1:24)
66 disp(size(M('dims')))
67 disp(size(M('entries')))
68
69 M_own            = mlist(['hm','dims','entries']);
70 M_own('dims')    = [2 3 2 2];
71 M_own('entries') = [1:24]';
72 disp(size(M_own('dims')))
73 disp(size(M_own('entries')))
74  ]]></programlisting>
75     </refsection>
76     <refsection role="see also">
77         <title>See also</title>
78         <simplelist type="inline">
79             <member>
80                 <link linkend="hypermatrices">hypermatrices</link>
81             </member>
82             <member>
83                 <link linkend="zeros">zeros</link>
84             </member>
85             <member>
86                 <link linkend="ones">ones</link>
87             </member>
88             <member>
89                 <link linkend="grand">grand</link>
90             </member>
91             <member>
92                 <link linkend="matrix">matrix</link>
93             </member>
94         </simplelist>
95     </refsection>
96 <refsection>
97         <title>History</title>
98         <revhistory>
99             <revision>
100                 <revnumber>6.1</revnumber>
101                 <revremark>hypermat() removed.</revremark>
102             </revision>
103         </revhistory>
104 </refsection>
105 </refentry>