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.
Is there an gui_ClosingFcn
callback I should define in analogy to the gui_OpeningFcn
template that guide creates for me?
If a file contains a function with one or more nested functions, then every function in the file must be terminated with end . If a script contains one or more local functions, then every function in the file must be terminated with end .
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.
Figure windows have a CloseRequestFcn
property, which defines a callback function that will run when the window is closed (before deleting the window).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With