How to pass a parameter to and events for stopping an ODE solver

1 view (last 30 days)
I would like to pass a parameter to the events function that I am using for stopping an ODE solver. I try function [value, isterminal,direction]=Pin_Sep(t,y,C,P) and options=odeset('Events',@Pin_Sep);
I get a "Too many input arguments" error

Answers (1)

Jan
Jan on 8 Jan 2013
Edited: Jan on 8 Jan 2013
See http://www.mathworks.com/matlabcentral/answers/1971 . The same works for the event functions also.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!