MATLAB Answers


Using event function multiple times

Asked by pxg882
on 7 Dec 2012

Hi, I am using the event function whilst solving a system of ODEs but I would like to find where multiple functions are 0. I've tried using:

function [value,isterminal,direction] = event_function(eta,X)
value = X(1) & X(2) & X(3) & X(4);     
isterminal = 1;   
direction = 0;   

But this doesn't work. Does anybody know how to get round this?

  1 Comment

What is the value of X?


No products are associated with this question.

0 Answers

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!