Bug Fix #14415 - Corrected some spellings error in help pages
[scilab.git] / scilab / modules / elementary_functions / help / en_US / issquare.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) 2013 - Scilab Enterprises
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:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="issquare" xml:lang="en">
17     <refnamediv>
18         <refname>issquare</refname>
19         <refpurpose>check if a variable is a square matrix</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Syntax</title>
23         <synopsis>t=issquare(x)</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Arguments</title>
27         <variablelist>
28             <varlistentry>
29                 <term>x</term>
30                 <listitem>
31                     <para>scalar,vector, matrix, hypermatrix, list, array of structures or cells</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>t</term>
36                 <listitem>
37                     <para>a boolean</para>
38                 </listitem>
39             </varlistentry>
40         </variablelist>
41     </refsection>
42     <refsection>
43         <title>Description</title>
44         <para>
45             <literal>
46                 issquare(<varname>x</varname>)
47             </literal>
48             returns true if <varname>x</varname>
49             is a square matrix (all dimensions of <varname>x</varname> are the same, with eventually singletons
50             if <varname>x</varname> is an hpermatrix).
51         </para>
52         <para>
53             <note>
54                 Note that <literal>issquare([])</literal> returns false.
55             </note>
56         </para>
57     </refsection>
58     <refsection>
59         <title>Examples</title>
60         <programlisting role="example"><![CDATA[
61 issquare(ones(10,10))
62 issquare(1)
63 issquare(["s" "t"; "t" "s"])
64 issquare(rand(2,1,2))
65 issquare(rand(2,2,3))
66 s = struct();
67 issquare(s) // Empty structure
68 clear s
69 s.a = %z;
70 s.b = 2;
71 issquare(s); // Scalar structure
72 clear s
73 s(1,2).a = 3;
74 s(1,3).b = %z;
75 issquare(s) // Row array of structures
76 clear s
77 s(2,1).a = "w";
78 s(3,1).b = %t;
79 issquare(s) // Column array of structures
80 clear s
81 s(1,2).a = -2;
82 s(3,1).b = %pi;
83 issquare(s) // 2D not-square array of structures
84 clear s
85 s(2,2,2).a = %f;
86 s(1,2,1).b = list(%e, %s);
87 issquare(s) // 3D (cubic) array of structures
88 clear s
89 s(2,1,2).a = 3;
90 s(1,1,2).b = "test";
91 issquare(s) // 3D array of structures (with a singleton dim)
92  ]]></programlisting>
93     </refsection>
94     <refsection role="see also">
95         <title>See also</title>
96         <simplelist type="inline">
97             <member>
98                 <link linkend="isscalar">isscalar</link>
99             </member>
100             <member>
101                 <link linkend="isrow">isrow</link>
102             </member>
103             <member>
104                 <link linkend="iscolumn">iscolumn</link>
105             </member>
106             <member>
107                 <link linkend="ismatrix">ismatrix</link>
108             </member>
109             <member>
110                 <link linkend="isempty">isempty</link>
111             </member>
112         </simplelist>
113     </refsection>
114     <refsection>
115         <title>History</title>
116         <revhistory>
117             <revision>
118                 <revnumber>5.5.0</revnumber>
119                 <revremark>Function issquare introduced.</revremark>
120             </revision>
121         </revhistory>
122     </refsection>
123 </refentry>