Handle figures without bringing them to the front

I'm using 'get' to save the name of a figure with:
h = get(figure(n),'Name')
The problem is I want to do this without having the figure window beeing brought to the front. Is there anyway to do this with the figure still minimized or at the back?

 Akzeptierte Antwort

Daniel Shub
Daniel Shub am 9 Nov. 2011

0 Stimmen

You can do
h = get(n, 'Name')
but you might want to consider doing something like
hfig = zeros(N, 1);
for n = 1:N
hfig(n) = figure;
end
h = get(hfig(n), 'name');
This way if you have existing figures, you don't have to worry about offsets to n.

1 Kommentar

Jonas
Jonas am 9 Nov. 2011
Yes, ofcourse I dont need the 'figure' bit and can just use n directly.
I obviously need a lunch break :) Thank you!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by