Figures close after running script
Show older comments
I'm running matlab through the command line interface, and when I call it to run a specific script (e.g. matlab -nosplash -nodesktop <test.m), all the figures and plots I issue in the script test.m are closed (so I only glimpse them for a few seconds). Is there a way to keep the figures around?
Answers (2)
Geoff Hayes
on 7 Apr 2015
0 votes
João - put a pause call at the end of your code to temporarily halt the execution before the script ends. See the link for details on how to use this function.
1 Comment
João André
on 7 Apr 2015
Image Analyst
on 7 Apr 2015
Try putting this in somewhere near the end of your code:
uiwait(helpdlg('Examine the figures, then click OK to finish.'));
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!