y = event(x);
y becomes true when x is zero. This function forces the integration algorithm to find the exact point where the input crosses zero from a negative to a positive value. This is called a state event.
x = sin(time*omega +phi);
y = eventup(x);
y must be a boolean, x must be an expression yielding a scalar.