%   EVENTS for Falkner-Skan
    function [value,isterminal,direction]=events(eta,Y,beta);
    value=[Y(2)+1 Y(2)-2] ;       % value of termination limits for integration
    isterminal=[1 1] ;   % terminate integration at value
    direction=[-1 1];   % decreasing to lower limit; increasing to upper limit
