Solving a Matrix-Differential equation with e.g. ode45 derived from some matrix-valued function $E(t)$ where $E$ is a $m\times m$ Matrix, I get a ODE $$\dot E=-G(E)+Re( \langle G(E),E \rangle )E$$ with $\langle,\rangle$ the standard scalar product and $G(E)$ as well a $m\times m $ matrix.
$E \in \mathbb{C}^{m\times m}$ with Frobeniusnorm of 1 and $E$ a real multiple of $G(E)$ along Solutions of the ODE. The ODE arises out of a revised paper, I have to base my bachelors thesis on, so the existence of a solution is given.
My idea was reshaping the $m\times m$ Matrices to a $1\times m^2$ vector, but I didn't get this to run. As I have never seen any examples, where all parts of the ODE are matrices I would appreciate some help. :)
The idea behind the paper is, given a square matrix $A$ with some eigenvalues with positive real part you want to find a perturbationmatrix $E$, such that $A+\varepsilon E$ has no eigenvalue with positive real part. $(\varepsilon>0)$ $\lambda_i(t)$ for $i=1,...,m$ denotes one of the simple eigenvalues of $A+\varepsilon E(t)$, $x_i ,y_i$ left and right eigenvectors. While deducing the ODE $G(E)$ is given as $G(E)=\sum_{i=1}^m \frac{Re(\lambda_i)}{x_i^*y_i}x_iy_i^*$, with $^*$the complex conjugate. Solving the ODE gives the wanted perturbation.
Mostly my implementation errors are dimensionality issues,I understand using matlabs ode45 for equations of type $\dot{x}=Ax$, with $A$ some square matrix. But with $E$ not being a vector, I don't know how to do it.