自分自身以外のすべてのウインドウを閉じる方法
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
matlab 2018a を使用し、matlab gui でツールを作成しています。
ボタンを押下時、全てのfigure ウインドウを閉じるようにしたいです。
close all では自分自身も閉じてしまいます。
自分自身以外のウインドウを閉じるようにするにはどうすればよいでしょうか。
0 commentaires
Réponse acceptée
Kazuya
le 30 Nov 2018
あまりかっこいい方法ではないですが、
close(h) % h は閉じるべきFigureのハンドル
の構文で、「自分自身」以外の Figure をハンドルで明示的に指定して消すしかなさそうですね。。
消されるべきそれぞれの Figure を作る時にハンドルを確保しておくか、'Tag' 名を設定しておき、
h = findobj('Tag',TagName,...)
で取ることもできますが、どうでしょう?
1 commentaire
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur グラフィックス オブジェクトのプロパティ 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!