Matlab ode45. How to change a parameter inside it while calling it?

You want make F an argument of your derivative function and pass the right anonymous function to ode45:

[t,N] = ode45(@(t,y) rateEquations(t,y,F), timeSpan, initialConditions)

Leave a Comment