Power a square matrix

I have a square matrix and its arrays are my optimization variables. I need to power this matrix to 2,3,…,10. How can I do this in cvx?

As your welcome to the forum, please carefully read the link below.

You can’t form matrix power in CVX for a non-diagonal n by n matrix for n >= 2, because such power is non-convex.

Depending on the usage, perhaps it’s possible to formulate in a way without constructing the matrix power. But for that to work in CVX, it is necessary (but not sufficient) that the optimization problem is convex.