Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Elementary Functions > Exponential > power

power

指数演算子 (^,.^)

呼出し手順

t = A ^ b
t = A ** b
t = A .^ b

引数

A, t
a scalar, vector, or matrix of encoded integers, decimal or complex numbers, polynomials, or rationals.

b
a scalar, vector, or matrix of encoded integers, decimal or complex numbers.

If an operand are encoded integers, the other one can be only encoded integers or real numbers.

If A are polynomials or rationals, b can only be a single decimal (positive or negative) integer.

説明

.^ by-element power

If A or b is scalar, it is first replicated to the size of the other, with A*ones(b) or b*ones(A). Otherwise, A and b must have the same size.

Then, for each element of index i, t(i) = A(i)^b(i) is computed.

^ matricial power

The ^ operator is equivalent to the .^ by-element power in the following cases:

  • A is scalar and b is a vector.
  • A is a vector and b is scalar.
Otherwise, A or b must be a scalar, and the other one must be a square matrix:
  • If A is scalar and b is a square matrix, then A^b is the matrix expm(log(A) * b)

  • If A is a square matrix and b is scalar, then A^b is the matrix A to the power b.

追加の注記
  1. 正方行列の場合, A^pは, pが正のスカラーの場合は行列の逐次乗算により計算され, それ以外の場合,対角化により計算されます (詳細は"注記2および3"を参照).

  2. Aが正方かつエルミート行列で p が整数でないスカラーの場合, A^p は以下の様に計算されます:

    A^p = u*diag(diag(s).^p)*u' (Aが実数行列の場合, 答えの実部のみが考慮されます).

    uおよびs は, [u,s] = schur(A) により定義されます.

  3. A がエルミート行列でなく, p が非整数スカラーの場合, A^p は以下の様に計算されます:

    A^p = v*diag(diag(d).^p)*inv(v) (Aが実数行列の場合, 答えの実部のみが考慮されます).

    d および v は, [d,v] = bdiag(A+0*%i)により定義されます.

  4. A および p が実数または複素数の場合, A^p は以下のように計算される 主値となります:

    A^p = exp(p*log(A))

    (またはA^p = exp(p*(log(abs(A))+ %i*atan(imag(A)/real(A)))) ).

  5. A が正方行列で p が実数または複素数の場合, A.^p は以下のように計算される 主値 となります:

    A.^p = exp(p*log(A)) (上記のケース4と同じ).

  6. ** および ^ 演算子は同義です.

Exponentiation is right-associative in Scilab, contrarily to Matlab® and Octave. For example 2^3^4 is equal to 2^(3^4) in Scilab, but to (2^3)^4 in Matlab® and Octave.

A = [1 2 ; 3 4];
A ^ 2.5,
A .^ 2.5
(1:10) ^ 2
(1:10) .^ 2

A ^ %i
A .^ %i
exp(%i*log(A))

s = poly(0,'s')
s ^ (1:10)

参照

  • exp — 要素毎の指数関数
  • expm — 正方行列の指数関数
  • hat — (^) 累乗
  • inv — 逆行列

履歴

バージョン記述
6.0.0 With decimal or complex numbers, scalar ^ squareMat now yields expm(log(scalar)*squareMat) instead of scalar .^ squareMat
Report an issue
<< polar Exponential sqrt >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:37:47 CET 2022