.^
Element-wise matrix power operator.
Syntax
R = x.^y
Inputs
- x
- The base.
- y
- The exponent.
Outputs
- R
- The power operation result.
Example
Scalar raised to a scalar
power:
R = 2 .^ 3
R = 8
Matrix raised to a scalar power,
element-wise:
R = [2, 3; 4, 5] .^ 2
R = [Matrix] 2 x 2
4 9
16 25
Matrix raised to a matrix power,
element-wise:
R = [2, 3; 4, 5] .^ [3, 2; 2, 1]
R = [Matrix] 2 x 2
8 9
16 5