A small improvement is possible, when you exploit, that the terms of dcdt(4:6) are identical, but I assume this saves some percent only. A better improvement can be achieved, if you define the tolerances of ODE45 exactly to your needs instead of using the default values. This influences the number of integration steps remarkably and can reduce the runtime substantially.
But before you start to optimize the ODE45 call, use the profiler to find out, if this is the bottleneck at all: Care only for the part, which consumes the most time. If a piece of code needs 2% of the total time only, reducing its runtime by 50% will let the program run 1% faster only.
So please mention, what profiler reveals.
Best Answer