power
Perform power operation, applied to matrices on an element-wise basis, equivalent to the .^ operator.
Syntax
R = power(x,y)
Inputs
- x
- The base.
- y
- The exponent.
Outputs
- R
- The power operation result.
Example
R = power(2, 3)
R = 8
R = power([2, 3; 4, 5], 2)
R = [Matrix] 2 x 2
4 9
16 25
R = power([2, 3; 4, 5], [3, 2; 2, 1])
R = [Matrix] 2 x 2
8 9
16 5