C = mpower(A, B)
C = A ^ B
| Parameter | Description |
|---|---|
| A | a variable |
| B | a variable |
| Parameter | Description |
|---|---|
| C | result of A^B |
C = mpower(A, B) performs matrix power operation: A^B
Sparse floating-point square matrices are supported for integer scalar exponents. Double, single, complex double, and complex single sparse matrices keep sparse storage when possible.
For non-integer scalar exponents, Nelson uses a dense matrix-function fallback when the sparse input class supports it.
mpower(3, 4)
3^4
A = sparse(single([1 2; 3 4]));
R = A ^ 2
full(R)
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 2.0.0 | expanded sparse single and complex single matrix power support |