function [h,finish,dir]= mycheck(t,y)
global param1
h=[y(2)];
finish=[1]; 
dir=[0];
end

