MATLAB Answers


Why do figures display simultaneously in MATLAB R2014b?

In MATLAB R2014a, I used to create multiple figures with a single script. In R2014a, the figures would be created one after the other as the script executed. However, in MATLAB R2014b, I notice that the figures appear simultaneously, once the script has completed execution. I want to see the figures appear when the appropriate commands are called in the script, and not at the end of the execution. How can I do that?




1 Answer

Answer by MathWorks Support Team on 26 Aug 2014
 Accepted Answer

If you create multiple figures in a script in R2014a and earlier, then MATLAB® attempts to wait for each figure to display on the screen before continuing to execute the script. Starting in R2014b, MATLAB does not wait for a figure to display before continuing to execute the script. Thus, the script might run to completion before the figures are displayed. This change is most noticeable for scripts that create multiple figures and perform long computations.
To force figures to display as they are created, use 'drawnow'.


Sign in to comment.