MATLAB function that computes $A^n$, being $A$ an square matrix and $n$ an natural number?

115 Views Asked by At

Do any of you know a matlab function that computes $A^n$ just like in the following example?

enter image description here

This question arises in response of discrete time state space systems.

1

There are 1 best solutions below

3
On BEST ANSWER

Try this:

syms n;
A = sym([0 1; -1/6 5/6]);
[V,D] = eig(A);
An = V*(D^n)*inv(V);
pretty(An);