Reputation: 2544
In Matlab I can get the figure name by using:
get(figure(1), 'Name')
where I now get the first figures name. However with this method the figure pops up and becomes visible, even though I have set set(0,'DefaultFigureVisible','off')
.
How can I get the figure name without showing the figure on screen?
Upvotes: 1
Views: 634
Reputation: 5126
In case you don't know the handler:
get(get(0,'Children'),'Name')
Upvotes: 0
Reputation: 32930
Try using the figure handle itself instead of invoking figure
:
get(1, 'Name')
Upvotes: 2