The following code, when ran within MATLAB, shows a plot in a figure window, when the figure window is focused and ENTER is pressed, the next plot is shown, this behaviour is correct:
function pausetest()h = plot(rand(10));pauseh = plot(rand(10));pauseh = plot(rand(10));
However when compiled as a stand-alone, every time PAUSE is executed, pressing ENTER while the figure window is focused does not have any effect. Instead, the DOS window needs to be selected for the ENTER key to be recognized and the next plot to be shown.
Best Answer