1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
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.
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="hat">
18 <refname>hat</refname>
19 <refpurpose>(^) exponentiation</refpurpose>
23 <synopsis>A^b</synopsis>
26 <title>Description</title>
28 Exponentiation of matrices or vectors by a constant vector.
31 If <literal>A</literal> is a vector, the exponentiation is done
32 element-wise, with the usual meaning.
35 For a square <literal>A</literal> matrix, the exponentiation is done in the matrix sense.
38 For boolean, polynomial and rational matrices, the exponent must be an
42 <title>Remarks </title>
44 <literal>123.^b</literal> is interpreted as <literal>(123).^b</literal>. In such
45 cases dot is part of the operator, not of the number.
48 For two real or complex numbers <literal>x1</literal> and
49 <literal>x2</literal> the value of <literal>x1^x2</literal> is the "principal value"
50 determined by <literal>x1^x2 = exp(x2*log(x1))</literal>.
54 Exponentiation is right-associative in Scilab contrarily to MatlabĀ® and Octave.
55 For example 2^3^4 is equal to 2^(3^4) in Scilab but is equal to (2^3)^4 in MatlabĀ®
62 <title>Examples</title>
63 <programlisting role="example"><![CDATA[
72 <refsection role="see also">
73 <title>See also</title>
74 <simplelist type="inline">
76 <link linkend="power">power</link>
79 <link linkend="exp">exp</link>
82 <link linkend="log">log</link>
85 <link linkend="log2">log2</link>
88 <link linkend="inv">inv</link>