0
$\begingroup$

I have this PDE which looks like this $\frac{d\vec{x}}{dt}= A\vec{x}+B\vec{x}$

Where $A$ and $B$ are both $n\times n$ matrices, and $\vec{x}$ is a state vector.

Without making this too complicated I have a $141\times29$ matrix showing the evolved state of $\vec{x}$ for $29$ time steps, represented in the basis of eigenvectors from matrix $A$. Lets call this $141\times29$ matrix --Solution--

I didn't solve the system myself, and don't know how to set up the equation to get Solution in the basis of eigenvectors from matrix $B$ so I'm trying to do a change of basis, in order to get Solution in terms of the eigenvectors of matrix $B$.

I know both matrix $A$ and $B$ as then I know their eigenvectors

EigA = {valA, vecA} = Eigensystem[N[A]];
EigB = {valB, vecB} = Eigensystem[N[B]];
SolutionB = 
Table[Abs[Sum[Solution[[i, t]]*vecA[[m]].vecB[[i]], {i, 1, 141}]], {m, 1, 141}, {t, 1, 29];

But when I get my result the solution doesn't look correct according to myself and all my friends.

$\endgroup$
2
$\begingroup$

So is what you want just the change of basis from $A$ to $B$? If so, then the mathematical operation you want is probably that described here, which might be implemented as

Inverse[Transpose@Eigenvectors@matrixB].Transpose@Eigenvectors@matrixA

which could then be Mapped across your Solution matrix

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.