This question is closed. Reopen it to edit or answer.
Struggling at events of ode function
1 view (last 30 days)
I'm trying to use events function to find the coordinates of a ODE function of n variables. What I want is to find the results of x(i)=certain value m times.
I've read the help about events but I don't get how to implement it. I've also seen other posts and the ball bounce example but what I want to know is how to tell the program that the event is x(2)=0. At the moment I have:
[value,isterminal,direction] = events(t,y);
[T,Y,TPS,YPS,~] = ode45( fun,tspan,condIni,options );
This is part of my code, apparently not defined variables as 'talls' or 'step' are defined previously.