ODE45 speed up and for loops
I have a coupled first order ODE to solve of the form
dy = f(t, x) dx = d(f, x)
which depend on a common parameter which I have to solve for over some range. I can solve the system using ODE45 and a for loops which increments the parameter of interest at each loop, however, this is very slow. Can I avoid solving this problem in loops? Or what is best practice with problems of this type.
Wanted to post a comment but I can't until I get 50 reputation. What do you need to solve the parameter in each range? Can't you create a function for solving the parameter and put the function handle in the second argument for ode45?