pause on just lets later pause statments go.
To pause with pause you want pause(n) or pause(inf)
or possibly waitforbuttonpress.
or probably better in this case uiwait and iuresume, which respect the gui a bit more.
I suggest :
function pushbutton2_Callback(hObject, eventdata, handles)
global...