MATLAB: How to exit a GUI program

gui

If I exit a GUI code when it is running,it will still be running in the background or maybe some errors will occur. I want to know whether there is a function that can completely exit the program and kill all errors.

Best Answer

>> close all force
Well depends on what you want exactly, but after exist if you feel there are some hidden figures or some reason to think there is something open, the above command forces them to close. Use it when the CloseRequestFcn has been modified for example.