Operations on graphic object arrays

Could someone please tell me how I could close() or clf() an array of figure handles without using a for loop. Some sort of indexing??

1 Comment

"Could someone please tell me how I could close() or clf() an array of figure handles without using a for loop."
Why not just read the close and clf documentation? It tells you exactly how to do that.

Answers (1)

Jan
Jan on 2 Mar 2018
Edited: Jan on 2 Mar 2018
I strongly recommend to read the documentation in case of questions: doc close. There you find, that the argument of close() can be an array also:
H(1) = figure;
H(2) = figure;
H(3) = figure;
pause(1.0);
close(H)
By the way: This is nicer than using a for loop, but such a loop would not be bad in any way. Why do you want to avoid a loop?

This question is closed.

Products

Asked:

on 2 Mar 2018

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!