MATLAB Runtime Server    

Using a Uicontrol or Uimenu to Exit the Application

In addition to adapting the CloseRequestFcn, you might want to provide a button or menu option on the GUI that allows the user to exit the Runtime Server.

For example, a common GUI convention on most platforms is a File menu containing a Quit option. You can create a menu like this by using a uimenu object with 'shutdown' as the callback, where shutdown.m is a shut-down function that you write. For example,

You can create a Quit button in a similar way.


  Using the CloseRequestFcn to Exit the Application Trapping Errors