mpower
Matrix power (A ^ B).
Syntax
Section titled “Syntax”C = mpower(A, B)Description
Section titled “Description”Returns A^B — matrix A raised to the matrix or scalar power B. For positive integer B, this is repeated matrix multiplication. For non-integer or matrix B, computed via eigendecomposition: A^B = V * D^B * inv(V) where [V, D] = eig(A). Same as the ^ operator on matrices.
For elementwise array power, use .^ or power.
Examples
Section titled “Examples”A = [1 1; 0 1];A^3 % [1 3; 0 1] matrix cubeA^0 % [1 0; 0 1] identity