MATLAB: Multiple initial conditions differential equations

differential equationsinitial conditions

Is there a way to solve multiple initial conditions in the same ode solver?

Best Answer

There's no immediate way to do this (AFAIK). Some possible workarounds would be to make a larger system of equations (ie just stack the x-y pairs into one big vector), or to run multiple times and specify the time points where you want the solution. In the latter case, you could either do this for all runs or for the first and then use the times returned for that run as inputs for the remaining runs.
(Dumb question: is there any reason they have to be at the same time points? If, for example, you're just plotting the results, would you even notice the time points?)