Borrar filtros
Borrar filtros

Minimizing MATLAB windows while running?

15 visualizaciones (últimos 30 días)
Steven
Steven el 27 de Dic. de 2013
Comentada: DGM hace alrededor de 6 horas
In my code, series of images are being processed and at each stage I have to show different figures in several windows, but as you know while running each window comes up and prevents you from doing your other things with your PC while running.
Is it possible to ask MATLAB to minimize all the windows (while running), so that the user can do his other things meanwhile?
Thanks so much.
Steven

Respuesta aceptada

Image Analyst
Image Analyst el 27 de Dic. de 2013
  2 comentarios
Steven
Steven el 27 de Dic. de 2013
Great! Thanks! I see that it has recently been updated!
Thanks!
DGM
DGM hace alrededor de 6 horas
I don't know why that reference answer got deleted, but it's still archived:
The issue here is that the creation of new figure windows will typically steal focus from other applications, depending on window manager settings. Minimizing windows afterward does nothing to solve the problem.
This is the original answer --->
A change was made in MATLAB R2013b that causes new figure windows to appear in the foreground. There are three workarounds to achieve the desired effect:
1. Make plots invisible as they are plotted, and return them to visible once all plots are complete.
There are two ways to make the plots invisible:
a) After each "figure" statement, execute:
set(gcf, 'visible', 'off');
b) Set the default figure visible option to 'off' once in the beginning:
set(0, 'DefaultFigureVisible', 'off');
Once all the plots are complete, return the property to 'on':
set(0, 'DefaultFigureVisible', 'on');
At the end of the script, make all the plots visible. Suppose there are n figures with numbers 1 through n. Execute:
set(1:n, 'visible', 'on');
2. Dock all new figures with
set(0, 'DefaultFigureWindowStyle', 'docked');
Return this property to normal at the end of the script with
set(0, 'DefaultFigureWindowStyle', 'normal');
3. Generate the n empty figures at the beginning of the script:
for i = 1:n
figure(i);
end
Then, when plotting, instead of "figure(i)", use
set(0, 'CurrentFigure', i);
If it is important to periodically check the outputs of the plots while the script is running, options 2 or 3 may be more useful than 1.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by