You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
odeint2 Is there a way to implement matlab's ode45 event mechanism such as the following code:
tspan=[0 t_max]; %Time span of simulation in sec
Opt = odeset('Events', @myevent);
[t,x]=ode45(@EOM,tspan,x0,Opt); function [value, isterminal]; %Time span of simulation in sec
function [value, isterminal, direction] = myEvent(t, y)
%value = (y(11) < 0);
value = y(11); isterminal = 1; % myEvent(t, y)
isterminal = 1; % Stop the integration
direction = -1; end
end
Translated with DeepL.com (free version)
The text was updated successfully, but these errors were encountered:
odeint2 Is there a way to implement matlab's ode45 event mechanism such as the following code:
tspan=[0 t_max]; %Time span of simulation in sec
Opt = odeset('Events', @myevent);
[t,x]=ode45(@EOM,tspan,x0,Opt); function [value, isterminal]; %Time span of simulation in sec
function [value, isterminal, direction] = myEvent(t, y)
%value = (y(11) < 0);
value = y(11); isterminal = 1; % myEvent(t, y)
isterminal = 1; % Stop the integration
direction = -1; end
end
Translated with DeepL.com (free version)
The text was updated successfully, but these errors were encountered: