MATLAB: Solving Matrix differential equations

differential equationsmatrix

I'm looking to solve a system of the type dxdt=A*x where dxdt and x are 1xn vectors and A is an nxn matrix. I know I can use something like ode45 to solve each row individually, but figured matlab must have a way of solving such systems. Thanks in advance!

Best Answer

dxdt and x should be n by 1 vectors.
Yes. ode45 or other ode solver can solve the system at once. run odeexamples.m to see various example.
You might consider use ss() if A is time-invariant matrix.
Related Question