Group Abstract Group Abstract

Message Boards Message Boards

What is wrong with WhenEvent ?

Posted 10 months ago

I posted this question on StaxExchange, and while I received a couple of responses, I'm not satisfied. In the attached very simple code, when WhenEvent is not present, the computation runs smoothly. When WhenEvent is present, which only checks on the time value and does not address values of the dependent variables, the error is generated which makes (to me) no sense. How could the presence of such WhenEvent operator spoil the code in the 1st place ?

Could someone please tell me what is going on.

POSTED BY: Mikhail Khenner
3 Replies
Posted 10 months ago

Michael and Gianluca -

Thank you so much ! Indeed, I missed an very simple syntax error.

POSTED BY: Mikhail Khenner
POSTED BY: Michael Rogers
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard