MATLAB GUIの閉じるボタンについて

GUIで作成した画面で、元からある右上の赤い×ボタン(閉じるボタン)を押したらMATLABのすべての処理を中断する方法はありますか?
GUI画面は消えても処理は継続されます。
<処理の流れ>
①mファイル読み込ませる。
②GUI画面が出て入力をする。
③実行ボタン(自作)を押す。
④残りのmファイルが実行される。
②の時に×を押すと③以降は処理しないでコマンドウィンドウに「中止しました」と表示させる。

 Accepted Answer

Tohru Kikawada
Tohru Kikawada on 15 Jan 2019
Edited: Tohru Kikawada on 15 Jan 2019

1 vote

FigureのCloseRequestFcnというコールバック関数を設定してみてはいかがでしょうか。
ご参考になれば幸いです。

1 Comment

qrqr
qrqr on 1 Feb 2019
ありがとうございます。

Sign in to comment.

More Answers (0)

Categories

Find more on 起動と終了 in Help Center and File Exchange

Products

Tags

Asked:

on 15 Jan 2019

Commented:

on 1 Feb 2019

Community Treasure Hunt

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

Start Hunting!