Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NDSolve[
- {y''[t] == 10, y[0] == 0, y'[0] == 0},
- {y},
- {t, 0, 1},
- Method -> {"EventLocator",
- "Event" :> {y[t] - 2, y[t] - 1},
- "EventAction" :>(*{Throw[Print["i=",1],"StopIntegration"],Throw[
- Print["i=",2],"StopIntegration"]}*)
- Table[Throw[Print["i=", i], "StopIntegration"], {i, 3}]
- }
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement