%% Save and Restore Pause State
% Store the current pause setting and then disable the ability to pause execution.

oldState = pause('off')

%
% Query the current pause setting.

pause('query')

%
% Restore the initial pause state.

pause(oldState)
pause('query')

%
% Alternatively, you can store the queried value of the pause state and then disable the ability to pause execution.

oldState = pause('query');
pause('off')

%
% Restore the initial pause state.

pause(oldState)

% Copyright 2012 The MathWorks, Inc.