Now that I have more complicated programs with Guide GUIs that are called by scripts, and serial port callbacks, stopping all execution cleanly is hard.
I've tried combos of delete(timerfind), clear all, delete(hObject), break, exit, fclose, delete, and a few others, but they all leave a mess. In addition, they require that every CloseRequestFcn in every GUI know what every other script has started and add a line just to close that thing = messy code.
Goal: If I close a GUI with the X in the upper right, I need a line or two to put in CloseRequestFcn that just stops EVERYTHING MatLab is doing, removes all running callbacks, and returns to the editor - hopefully without the slightly confusing "do I want to close MatLab" box. Thanx in advance.