在MATLAB中关闭GUI时执行的函数 [英] Function that executes on GUI closing in matlab

查看:1359
本文介绍了在MATLAB中关闭GUI时执行的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用指南在matlab中创建GUI.它是非阻塞的(不调用uiwait).关闭gui窗口后,我想执行一些清理代码.

I am creating a GUI in matlab using guide. It's non-blocking (not calling uiwait). When the gui window is closed, I would like to execute some clean up code.

是否存在类似于指南为我创建的gui_OpeningFcn模板的gui_ClosingFcn回调?

Is there an gui_ClosingFcn callback I should define in analogy to the gui_OpeningFcn template that guide creates for me?

推荐答案

图形窗口具有

Figure windows have a 'DeleteFcn' property, which defines a callback function that will run when the window is closed/deleted. You could potentially use that to do your clean-up.

这篇关于在MATLAB中关闭GUI时执行的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆