How to stop, reset the variables and restart an ODE solver?
Show older comments
I am trying to solve a system of equations in which I want to stop the solver at certain t-values, reset the value of depenedent variables, and restart the solver. Is there an example that I can look at and try to mimic?
Answers (1)
Walter Roberson
on 3 Apr 2019
0 votes
Look at ballode and how it uses "events", and observe how it loops calls until the entire time is complete.
5 Comments
VR
on 18 Apr 2019
Walter Roberson
on 18 Apr 2019
Which release are you using? In R2019a, the function "events" is at the bottom of ballode.m
In any case, what I was referring to was not a specific function, but rather the Events option . In the version of ballode I am looking at now, close to the top of the file, a variable named options is assigned to using the result of calling odeset() with several parameters, the first of which is 'Events', @events . Perhaps in the version you are looking it it might say 'Events', @bounceEvents . The exact name of the function is not important: the importance is in the 'Events' option and the structure of the function that is called.
VR
on 18 Apr 2019
VR
on 18 Apr 2019
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!