Matlab R2010a crashing when trying to access the figure with visible off

1 view (last 30 days)
Hello All,
I am trying to run this script in which a lot of plots are created and since it is automated , to prevent a lot of plots from popping up I use following;
figure('Name', FigName,'Visible','off');
It does work fine for first few plots and then suddenly the software crashes with warning dialogue box asking me to close the program. - it does not generate dump file - java heap space is set to 2836 mb
Also when I run the same process in Matlab 2008 it runs fine without any errors. Thanks for your inputs in advance. Appreciate all your help. Vaibhav
  2 Comments
Jan
Jan on 31 Oct 2012
Edited: Jan on 31 Oct 2012
You forgot to mention in which Matlab version (32 or 64 bit) and operating system you get the problems. What does "a lot" exactly mean? 12 might be a lot, or 1'000'000 also.
Vaibhav Lawand
Vaibhav Lawand on 9 Nov 2012
My apologies, The 64 bit version of matlab 2010. And the number of figures is actually dependant on the data but generally, the figures range from 20 to 30 for one process. And I am closing the figures after I am done with 5 figures or so.

Sign in to comment.

Answers (1)

Jan
Jan on 31 Oct 2012
Do you delete formerly created figures, or do you have hundreds or thousands of figures open at the same time?
Instead of creating many figures, you can create one and update its contents. This is much faster in addition, because opening a figure is very time-consuming.
  1 Comment
Vaibhav Lawand
Vaibhav Lawand on 9 Nov 2012
Jan, Thanks for the reply. I dont delete figures, but I am not opening the figures by making the figures visible to off. And then at regular interval I do close all the figures just to help with java memory clearing.
So flow is like this - create figure with visible off --> save the figures at end with saveas--> move to next script, do the same --> close all

Sign in to comment.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!