I am writing a code for event detection. However, I want to increase the region of convergence from zero to about 1e-4.For example, instead of checking for y(1)-10=0, I want to check for y(1)-10<1e-4. How can this be done?
No products are associated with this question.
Return
y(1)-10 >= 1e-4
This will be false (0) when it is within 1e-4. Set the options so the crossing direction does not matter.
Undefined function or method 'sign' for input arguments of type 'logical'. Error in ==> odezero at 47.
It looks like it does not accept a logical value
2 Comments
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/80517#comment_157389
Are you referring to event detection in the context of one of the ode*() routines?
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/80517#comment_157473
Yes, it comes with the options parameter of ode*