I thought of exiting matlab in a different way, so came across this info submitted here, I made GUI which executes when i exits matlab, That's how you exit in style from matlab..... :)
Saim (2022). Matlab- Exiting in Style (https://www.mathworks.com/matlabcentral/fileexchange/18543-matlab-exiting-in-style), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!