i am using ode 45 with events and am having a problem i do not understand.
the problem is that i have defined the event in an event function and when i track the events values i clearly see that one goes to zero and the others do not so i am expacting one event as an output but i am recieving two event.
the other event clearly is not zero.
the codes i am using
ode 45 call:
tracking the events graphically:
the blue plot (data1) is the event that heppend and the red one (data2) is the event that the functions says that happened even thpough its value isnt 0
the output Iesl is [2;1]
can anyone shed some light on this problem? i am at a loss