I want to solve $\mathbf{A}^x = \mathbf{B}$ where $\mathbf{A}$ and $\mathbf{B}$ are both $n$-by-$n$ matrices and $x$ is real. I see that in general there may be no solutions, or multiple solutions.
I was trying to find the period of a discrete-time linear dynamical system, but now I'm interested in the equation itself.
By "solve" I mean, given the two matrices, how can I find $x$ using the linear algebra primitives that MATLAB has, for example. Or maybe there's a name for this equation.
edit maybe less generally $\mathbf{A}^x = \lambda \mathbf{I}$