function [val, isterm, dir] = test_event5 (~, x)
  val = [x-4, x-3, x-4];  % what happens when two events occur at same time?
  dir = [-1,-1,0]; 
  isterm = [0,0,0]; 
end
