number of figure windows that are currently open?
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Doug Ivers
le 8 Déc 2022
Réponse apportée : Daniel Vieira
le 8 Déc 2022
In a script can I get the number of figure windows that are currently open?
Why?: as I re-run the script over and over to generate another figure, I'd like to position each new figure incrementally to the right
0 commentaires
Réponse acceptée
Bora Eryilmaz
le 8 Déc 2022
Modifié(e) : Bora Eryilmaz
le 8 Déc 2022
f1 = figure;
f2 = figure;
F = findobj('Type', 'figure')
n = numel(F)
0 commentaires
Plus de réponses (1)
Daniel Vieira
le 8 Déc 2022
I do something like this:
for k=1:K
% my code here
figure;
% my plot here
fig=gcf; % get figure handle
fig.Position=[50+10*k 50+10*k fig.Position(3:4)]; % puts 1st image in pixel [50 50], second in [60 60], etc
end
0 commentaires
Voir également
Catégories
En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!