MATLAB: Handle figures without bringing them to the front

figure

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?

Best Answer

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.