Using ode45 in a for Cycle: Adding Parameters to odefun

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 4K views
bnsm
Messages
6
Reaction score
0
Hi guys,


I want to run a for cycle with ode45 inside. However, some parameters that I define in odefun (the differential equation in order to dy/dt, for instance) assume different values in each iteration of that cycle.

I find help examples showing odefun only receiving t and y... Is there any way to add more input parameters to odefun?



Thanks!
 
Physics news on Phys.org