Why a figure window with a certain figure number cannot be opened?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hello.
Opening a figure window by typing ">figure;" in my startup.m leads to the following strange behavior:
Waiting 5-10sec after the start of Matlab and then executing >figure(2); does not produce a new figure window. Typing >figure will open Figure 3, but Figure 2 will now be missing completely from the session.
Interestingly, opening two figure windows in startup.m by executing ">figure; figure;" does open Figures 1 and 2 as expected. However, now Figure 3 is impossible to open!
Similarly, opening one figure in startup.m and then typing >figure as quickly as possible upon the start of the session opens Figure 2 successfully. So it seems that the "missing figure" is the first one which I try opening after some time interval following the opening of the first batch of figures. I.e. opening four figures via startup.m and waiting for 5-10 sec before opening another figure in the session will make Figure 5 inaccessible, not even after any of the open figures is closed.
Any help with recovering the "missing figure" will be appreciated.
Thanks,
Valery.
Answers (1)
madhan ravi
on 3 Jul 2020
0 votes
That’s why you should assign a handle to the figure.
5 Comments
Valery Milner
on 3 Jul 2020
madhan ravi
on 3 Jul 2020
I’m not sure I’m following , what if
figure(h2)
Valery Milner
on 3 Jul 2020
Steven Lord
on 3 Jul 2020
Can you show us the output of this command?
get(h2)
Valery Milner
on 3 Jul 2020
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!