Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Event localization with ode | Error message: The ODE option 'Events'
must be set to 'on' | 'off'

Replies: 1   Last Post: Nov 28, 2011 12:55 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 111
Registered: 12/9/05
Event localization with ode | Error message: The ODE option 'Events'
must be set to 'on' | 'off'

Posted: Nov 25, 2011 6:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I just lost 1h solving a stupid issue and want to share my solution:

The ode-solvers are called with a function handle that compute
Suppose we have a function file get_df that does the job.
Then both syntax are fine

ode45(@get_df,[0 tmax],y0,options)
ode45('get_df',[0 tmax],y0,options)

The trouble is that for the second syntax, the internal variable
FcnHandlesUsed is set to zero,
and the event localization routines get confused.
Using the first syntax, everything is ok.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.