1         <?xml version="1.0" encoding="UTF-8"?>
2     <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA
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="hat">
14         <refnamediv>
15             <refname>hat</refname>
16             <refpurpose>(^) exponentiation</refpurpose>
17         </refnamediv>
18         <refsynopsisdiv>
19             <title>Calling Sequence</title>
20             <synopsis>A^b</synopsis>
21         </refsynopsisdiv>
22         <refsection>
23             <title>Description</title>
24             <para>
25                 Exponentiation of matrices or vectors by a constant vector.
26             </para>
27             <para>
28                 If <literal>A</literal> is a vector or a rectangular matrix the exponentiation is done
29                 element-wise, with the usual meaning.
30             </para>
31             <para>
32                 For square <literal>A</literal> matrix the exponentiation is done in the matrix sense.
33             </para>
34             <para>
35                 For boolean, polynomial and rational matrices, the exponent must be an
36                 integer.
37             </para>
38             <refsection>
39                 <title>Remarks </title>
40                 <para>
41                     <literal>123.^b</literal> is interpreted as <literal>(123).^b</literal>. In such
42                     cases dot is part of the operator, not of the number.
43                 </para>
44                 <para>
45                     For two real or complex numbers <literal>x1</literal> and
46                     <literal>x2</literal> the value of  <literal>x1^x2</literal> is the "principal value"
47                     determined by <literal>x1^x2 = exp(x2*log(x1))</literal>.
48                 </para>
49             </refsection>
50         </refsection>
51         <refsection>
52             <title>Examples</title>
53             <programlisting role="example"><![CDATA[
54 2^4
55 (-0.5)^(1/3)
56 [1 2;2 4]^(1+%i)
57 s=poly(0,"s");
58 [1 2 s]^4
59 [s 1;1  s]^(-1)
60  ]]></programlisting>
61         </refsection>
62         <refsection role="see also">
63             <title>See Also</title>
64             <simplelist type="inline">
65                 <member>