Efficiently Solve Matrix of ODE's in MATLAB without Rewriting as Column Vectors

  • Context: MATLAB 
  • Thread starter Thread starter juef
  • Start date Start date
  • Tags Tags
    Matlab Matrix
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 7K views
juef
Messages
27
Reaction score
0
Hey all,

Consider the system [tex]X' = f(X)[/tex], where [tex]X[/tex] is a square matrix. I would like to solve this system with MATLAB, but all of its solvers require [tex]X[/tex] to be a column vector.

Of course, it would be possible to rewrite [tex]X'[/tex] and [tex]f(X)[/tex] as column vectors, but I guess some efficiency would be lost. It would also be a lot of pain to do

So, does anyone know of a simpler way to do such a thing? Thank you!
 
Physics news on Phys.org
It's not a pain to do with the reshape command.
 
:shy: Why on Earth didn't I think of that? You can't possibly imagine how much that just helped me! Thank you very much!