how can I condition my ode solver
Show older comments
I use an ode solver here
[t, R] = ode78(@odefun, tspan, r0);
but I don't want it to run until the final t, I want it to run until R is at a certain value, and I have no idea how to go about doing that.
Answers (1)
Use the Event Facility of the ODE integrators:
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!