In my experience, the only way to use several cores for solutions for ODE solutions in MATLAB is to use the “loop loop” to run several calculations at the same time, one calculation will not be faster, but you can start a lot with different parameters and after this long wait has several solutions . Therefore, if you need to run ODE many times, that can speed up your work.
To speed up one ODE function, it’s also good to play with the RelTol and AbsTol settings (changing the shape of the time from several hours to several hours), using the Jpattern option can also be very useful (my almost three-diagonal drawing made it work twice as fast), If your differential the equation is simple, try to compile it first or at least vectorize it (I used to write some part of the code in Java, and then pointed MATLAB to use the compiled .class file). Obviously, the length of your solution vector plays an important role, so don't make it more than a few pursued.
source share