Can I run multiple sets of simultaneous ODEs using ODE45

I'm currently using ode45 to run one set of N simultaneous ODEs, and want to extend this to run multiple sets of ODEs simultaneously.
My problem is that when I try to add the second set of initial conditions (i.e moving from one column to two columns of intial conditions), still only the first set (column) of initial conditions are accepted.
%
pbe=@(t,f) myfunc(t,f,delx,eps,N,x,rho,k,kb,b,kg,g); %
[t,f]=ode45(pbe,tspan,[E1_f0,E2_f0]);
where E1_f0 and E2_f0 are respectively my first and second sets of initial conditions.
Is it possible for ode45 to do this? Or should I run multiple function files (bearing in mind my sets of ODEs are dependent): if this is the best option, my follow up question would be 'if I have multiple functions, can I allow them to run simultaneously AND update each other?'.
Thank you.

Answers (1)

madhan ravi
madhan ravi on 27 Dec 2018
Edited: madhan ravi on 27 Dec 2018
+1 interesting question ,
see parameterizing function , ofcourse you can run a loop and just index the initial conditions with loop iterator..

Products

Release

R2016b

Tags

Asked:

on 27 Dec 2018

Edited:

on 27 Dec 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!