Overview of Desktop Layouts

When you end a session, MATLAB saves the current desktop arrangement. The next time you start MATLAB, the desktop appears like the way you left it. However, tools such as the Help browser, Web browser, and Array Editor do not reopen automatically, even if they were open when you ended the last session. You can use startup options to specify tools that you want to open on startup. For example, to have the Help browser open each time you start MATLAB, add helpbrowser to a startup.m file. For more information, see Startup Options.

You can also use predefined layouts, and you can save your own layouts for later reuse.

Saving a Desktop Layout

To save your current desktop arrangement:

  • Select Desktop > Save > Layout.
  • Assign a name to the layout in the resulting dialog box, and then click OK.

MATLAB stores the arrangements you save as XML files in the preferences folder for MATLAB. Type prefdir in the Command Window to display the location of these XML files. The layout last used in a session is MATLABDesktop.xml. The MATLABDesktop.xml file loads when you start MATLAB and is overwritten when you close MATLAB.

Reusing a Saved or Predefined Desktop Layout

Select Desktop > Desktop Layout, and then select the name of the layout you want to use.

MATLAB includes the following predefined layouts:

  • Default — Contains the Current Folder, Command Window, Workspace Browser, and Command History windows.
  • Command Window Only — Contains the Command Window only.
  • History and Command Window — Contains the Command History window and Command Window.
  • All Tabbed — Contains all desktop tools, opened, maximized, and tabbed together.
  • All but Command Window Minimized — Contains all tools, opened and minimized in the desktop, except for the Command Window and sometimes the Editor. The Command Window and the Editor (if it contains a document) remain maximized.

When you select a saved or predefined layout, document tools already open in the desktop remain open.

Renaming a Saved Desktop Layout

Rename a desktop layout that you have previously created and saved as follows:

  • Select Desktop > Organize Layouts.
  • In the resulting dialog box, select a layout, click the Rename button.
  • Type the new name over the existing name.
  • Click Close.

You can rename desktop layouts that you created only.

Deleting a Saved Desktop Layout

Delete a desktop layout that you have previously created and saved as follows:

  • Select Desktop > Organize Layouts.
  • In the resulting dialog box, select a layout, click the Delete button, and then click Close.

You can delete desktop layouts that you created only.

Restoring the Default Desktop Layout

If you are dissatisfied with your current desktop arrangement, you can restore it to the default arrangement as follows:

The default arrangement is that which appeared when you first installed MATLAB.