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


hat

(^) exponentiation

Syntax

A^b

Description

Exponentiation of matrices or vectors by a constant vector.

If A is a vector, the exponentiation is done element-wise, with the usual meaning.

For a square A matrix, the exponentiation is done in the matrix sense.

For boolean, polynomial and rational matrices, the exponent must be an integer.

Remarks

123.^b is interpreted as (123).^b. In such cases dot is part of the operator, not of the number.

For two real or complex numbers x1 and x2 the value of x1^x2 is the "principal value" determined by x1^x2 = exp(x2*log(x1)).

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 is equal to (2^3)^4 in Matlab® and Octave.

Examples

2^4
(-0.5)^(1/3)
[1 2;2 4]^(1+%i)
s=poly(0,"s");
[1 2 s]^4
[s 1;1  s]^(-1)

See also

  • power — (^,.^) power operation
  • exp — element-wise exponential
  • log — natural logarithm
  • log2 — Base-2 logarithm. Base-2 exponent and mantissa of some real numbers
  • inv — matrix inverse
Report an issue
<< getscilabkeywords Scilab keywords less >>

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 Jun 17 17:49:14 CEST 2024