- #1
McLaren Rulez
- 292
- 3
Hi,
I have a bunch of closed differential equations that I want to solve. The variables of the DEs are 2x2 matrices. So, I want to enter some 2x2 matrices of variables and then use NDSolve to get the solution.
How should I define a 2x2 matrix with four variables inside it? I tried
matrix[a_, b_, c_, d_] := {{a, b}, {c,d}} but this doesn't work. Rather embarassingly, I can't find the solution after quite a bit of googling.
Thank you for your help!
I have a bunch of closed differential equations that I want to solve. The variables of the DEs are 2x2 matrices. So, I want to enter some 2x2 matrices of variables and then use NDSolve to get the solution.
How should I define a 2x2 matrix with four variables inside it? I tried
matrix[a_, b_, c_, d_] := {{a, b}, {c,d}} but this doesn't work. Rather embarassingly, I can't find the solution after quite a bit of googling.
Thank you for your help!
Last edited: