[doc] power() improved page
[scilab.git] / scilab / modules / elementary_functions / help / ja_JP / exponential / power.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) 2012 - 2016 - Scilab Enterprises
5  * Copyright (C) 2020 - Samuel GOUGEON
6  *
7  * This file is hereby licensed under the terms of the GNU GPL v2.0,
8  * pursuant to article 5.3.4 of the CeCILL v.2.1.
9  * This file was originally licensed under the terms of the CeCILL v2.1,
10  * and continues to be available under such terms.
11  * For more information, see the COPYING file which you should have received
12  * along with this program.
13  *
14 -->
15 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
16           xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
17           xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
18           xml:lang="ja" xml:id="power">
19     <refnamediv>
20         <refname>power</refname>
21         <refpurpose>指数演算子 (^,.^)   </refpurpose>
22     </refnamediv>
23     <refsynopsisdiv>
24         <title>呼出し手順</title>
25         <synopsis>
26             t = A ^ b
27             t = A ** b
28             t = A .^ b
29         </synopsis>
30     </refsynopsisdiv>
31     <refsection>
32         <title>引数</title>
33         <variablelist>
34             <varlistentry>
35                 <term>A, t</term>
36                 <listitem>
37                     a scalar, vector, or matrix of encoded integers, decimal or complex numbers,
38                     polynomials, or rationals.
39                     <para/>
40                 </listitem>
41             </varlistentry>
42             <varlistentry>
43                 <term>b</term>
44                 <listitem>
45                     a scalar, vector, or matrix of encoded integers, decimal or complex numbers.
46                     <para/>
47                 </listitem>
48             </varlistentry>
49         </variablelist>
50         <para>
51             If an operand are encoded integers, the other one can be only encoded integers or real
52             numbers.
53         </para>
54         <para>
55             If <varname>A</varname> are polynomials or rationals, <varname>b</varname> can only be
56             a single decimal (positive or negative) integer.
57         </para>
58     </refsection>
59     <refsection>
60         <title>説明</title>
61         <refsect3>
62             <title>.^ by-element power</title>
63             <para>
64                 If <varname>A</varname> or <varname>b</varname> is scalar, it is first
65                 replicated to the size of the other, with A*ones(b) or b*ones(A).
66                 Otherwise, <varname>A</varname> and <varname>b</varname> must have the same size.
67             </para>
68             <para>
69                 Then, for each element of index i, <literal>t(i) = A(i)^b(i)</literal>
70                 is computed.
71             </para>
72         </refsect3>
73         <refsect3>
74             <title>^ matricial power</title>
75             <para>
76                 The ^ operator is equivalent to the .^ by-element power in the following cases:
77                 <itemizedlist>
78                     <listitem>
79                         <varname>A</varname> is scalar and <varname>b</varname> is a vector.
80                     </listitem>
81                     <listitem>
82                         <varname>A</varname> is a vector and <varname>b</varname> is scalar.
83                     </listitem>
84                 </itemizedlist>
85                 Otherwise, <varname>A</varname> or <varname>b</varname> must be a scalar,
86                 and the other one must be a square matrix:
87                 <itemizedlist>
88                     <listitem>
89                         <para>
90                             If <varname>A</varname> is scalar and <varname>b</varname> is
91                             a square matrix, then <literal>A^b</literal> is the matrix
92                             <literal>expm(log(A) * b)</literal>
93                         </para>
94                     </listitem>
95                     <listitem>
96                         <para>
97                             If <varname>A</varname> is a square matrix and <varname>b</varname>
98                             is scalar, then  <literal>A^b</literal> is the matrix
99                             <varname>A</varname> to the power <varname>b</varname>.
100                         </para>
101                     </listitem>
102                 </itemizedlist>
103             </para>
104         </refsect3>
105         <refsect3>
106             <title>追加の注記</title>
107             <orderedlist>
108                 <listitem> <!-- #1 -->
109                     <para>
110                         正方行列の場合, <literal>A^p</literal>は,
111                         <literal>p</literal>が正のスカラーの場合は行列の逐次乗算により計算され,
112                         それ以外の場合,<emphasis>対角化</emphasis>により計算されます
113                         (詳細は"注記2および3"を参照).
114                     </para>
115                 </listitem>
116                 <listitem> <!-- #2 -->
117                     <para>
118                         <varname>A</varname>が正方かつエルミート行列で
119                         <literal>p</literal> が整数でないスカラーの場合,
120                         <literal>A^p</literal> は以下の様に計算されます:
121                     </para>
122                     <para>
123                         <code>A^p = u*diag(diag(s).^p)*u'</code> (<varname>A</varname>が実数行列の場合,
124                         答えの実部のみが考慮されます).
125                     </para>
126                     <para>
127                         <literal>u</literal>および<literal>s</literal> は, <code>[u,s] = schur(A)</code>
128                         により定義されます.
129                     </para>
130                 </listitem>
131                 <listitem> <!-- #3 -->
132                     <para>
133                         <varname>A</varname> がエルミート行列でなく,
134                         <literal>p</literal> が非整数スカラーの場合,
135                         <literal>A^p</literal> は以下の様に計算されます:
136                     </para>
137                     <para>
138                         <code>A^p = v*diag(diag(d).^p)*inv(v)</code>
139                         (<varname>A</varname>が実数行列の場合, 答えの実部のみが考慮されます).
140                     </para>
141                     <para>
142                         <literal>d</literal> および <literal>v</literal> は,
143                         <code>[d,v] = bdiag(A+0*%i)</code>により定義されます.
144                     </para>
145                 </listitem>
146                 <listitem> <!-- #4 -->
147                     <para>
148                         <varname>A</varname> および <literal>p</literal> が実数または複素数の場合,
149                         <literal>A^p</literal> は以下のように計算される
150                         <emphasis>主値</emphasis>となります:
151                     </para>
152                     <para>
153                         <code>A^p = exp(p*log(A))</code>
154                     </para>
155                     <para>
156                         (または<code>A^p = exp(p*(log(abs(A))+ %i*atan(imag(A)/real(A))))</code> ).
157                     </para>
158                 </listitem>
159                 <listitem> <!-- #5 -->
160                     <para>
161                         <varname>A</varname> が正方行列で
162                         <literal>p</literal> が実数または複素数の場合,
163                         <literal>A.^p</literal> は以下のように計算される
164                         <emphasis>主値</emphasis> となります:
165                     </para>
166                     <para>
167                         <code>A.^p = exp(p*log(A))</code> (上記のケース4と同じ).
168                     </para>
169                 </listitem>
170                 <listitem> <!-- #6 -->
171                     <para>
172                         <literal>**</literal> および <literal>^</literal> 演算子は同義です.
173                     </para>
174                 </listitem>
175             </orderedlist>
176             <para>
177                 <warning>
178                     Exponentiation is right-associative in Scilab, contrarily to Matlab® and Octave.
179                     For example 2^3^4 is equal to 2^(3^4) in Scilab, but to (2^3)^4 in Matlab® and
180                     Octave.
181                 </warning>
182             </para>
183         </refsect3>
184     </refsection>
185     <refsection>
186         <title>例</title>
187         <programlisting role="example"><![CDATA[
188 A = [1 2 ; 3 4];
189 A ^ 2.5,
190 A .^ 2.5
191 (1:10) ^ 2
192 (1:10) .^ 2
193
194 A ^ %i
195 A .^ %i
196 exp(%i*log(A))
197
198 s = poly(0,'s')
199 s ^ (1:10)
200  ]]></programlisting>
201     </refsection>
202     <refsection role="see also">
203         <title>参照</title>
204         <simplelist type="inline">
205             <member>
206                 <link linkend="exp">exp</link>
207             </member>
208             <member>
209                 <link linkend="expm">expm</link>
210             </member>
211             <member>
212                 <link linkend="hat">hat</link>
213             </member>
214             <member>
215                 <link linkend="inv">inv</link>
216             </member>
217         </simplelist>
218     </refsection>
219     <refsection role="history">
220         <title>履歴</title>
221         <revhistory>
222             <revision>
223                 <revnumber>6.0.0</revnumber>
224                 <revdescription>
225                     With decimal or complex numbers, <literal>scalar ^ squareMat</literal> now
226                     yields <literal>expm(log(scalar)*squareMat)</literal> instead of
227                     <literal>scalar .^ squareMat</literal>
228                 </revdescription>
229             </revision>
230         </revhistory>
231     </refsection>
232 </refentry>