フィルターのクリア

How to close only anova figures

3 ビュー (過去 30 日間)
Valerio Romano
Valerio Romano 2023 年 10 月 26 日
コメント済み: Valerio Romano 2023 年 10 月 31 日
After I run any script that generates multiple figures I know I can close all the figures with:
close all hidden
if it contains also anova results, but if I need to close only this latter type of figure I only found this way to close them:
anovaResultFigures = findall(0,'HandleVisibility','callback');
close(anovaResultFigures);
Is there a better and maybe more specific way to do it because I'm not sure if any other figure have this type of visibility?
  2 件のコメント
Walter Roberson
Walter Roberson 2023 年 10 月 26 日
Which function or app are you using to create the plots?
Valerio Romano
Valerio Romano 2023 年 10 月 29 日
I'm using anovan and anova functions. Those figures have different properties from plotting figures, that's why I was wondering if there is a way to close only those.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2023 年 10 月 29 日
close(findall(0, '-depth', 1, 'Type', 'figure', 'Name', 'N-Way ANOVA'))
The anova function does not produce any graphics, so there are no graphics to close for it.
  1 件のコメント
Valerio Romano
Valerio Romano 2023 年 10 月 31 日
Thanks, that's exactly what I was searching for.

サインインしてコメントする。

その他の回答 (1 件)

Chunru
Chunru 2023 年 10 月 26 日
How about collecting the desired figure handles in an array when creating the figures, such as
h(i) = figure(...);
At the end, just run
close(h)
to close the desired figures?
  1 件のコメント
Valerio Romano
Valerio Romano 2023 年 10 月 29 日
It would be the same as manually close them.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnalysis of Variance and Covariance についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by