Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
power
power operation (^,.^)
Calling Sequence
t=A^b t=A**b t=A.^b
Arguments
- A,t
scalar, polynomial or rational matrix.
- b
a scalar, a vector or a scalar matrix.
Description
"(A:square)^(b:scalar)"
IfA
is a square matrix andb
is a scalar thenA^b
is the matrixA
to the powerb
."(A:matrix).^(b:scalar)"
Ifb
is a scalar andA
a matrix thenA.^b
is the matrix formed by the element ofA
to the powerb
(elementwise power). IfA
is a vector andb
is a scalar thenA^b
andA.^b
performs the same operation (i.e elementwise power)."(A:scalar).^(b:matrix)"
IfA
is a scalar andb
is a matrix (or vector)A^b
andA.^b
are the matrices (or vectors) formed bya^(b(i,j))
."(A:matrix).^(b:matrix)"
IfA
andb
are vectors (matrices) of the same sizeA.^b
is theA(i)^b(i)
vector (A(i,j)^b(i,j)
matrix).
Notes:
-
For square matrices A^p
is computed through successive
matrices multiplications if p
is a positive integer, and by
diagonalization if not.
-
**
and ^
operators are synonyms.
Examples
A=[1 2;3 4]; A^2.5, A.^2.5 (1:10)^2 (1:10).^2 s=poly(0,'s') s^(1:10)
See Also
<< plus | Scilab keywords | quote >> |