mpower
Perform a matrix power operation, equivalent to the ^ operator.
Syntax
R = mpower(x,y)
Inputs
- x,y
- At most one of the arguments can be a matrix.
Outputs
- R
- The power operation result.
Examples
R = mpower([3, 2; 2, 3], 4)
R = [Matrix] 2 x 2
313 312
312 313
R = mpower(2, [3, 2; 2, 3])
R = [Matrix] 2 x 2
17.00000 15.00000
15.00000 17.00000
Comments
A matrix to a scalar power is only valid for a square matrix.
A scalar to a matrix power is equivalent to expm(log(scalar)*matrix) .