Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.1 - English

Change language to:
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 help >> Scilab > Scilab keywords > power

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)"If A is a square matrix and b is a scalar then A^b is the matrix A to the power b.

  • "(A:matrix).^(b:scalar)"If b is a scalar and A a matrix then A.^b is the matrix formed by the element of A to the power b (elementwise power). If A is a vector and b is a scalar then A^b and A.^b performs the same operation (i.e elementwise power).

  • "(A:scalar).^(b:matrix)" If A is a scalar and b is a matrix (or vector) A^b and A.^b are the matrices (or vectors) formed by a^(b(i,j)).

  • "(A:matrix).^(b:matrix)" If A and b are vectors (matrices) of the same size A.^b is the A(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

  • exp — element-wise exponential
<< plus Scilab keywords quote >>

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:
Thu Mar 03 10:59:31 CET 2011