When you start MATLAB®, the desktop appears in its default layout.
By default, the desktop includes these tools:
|Toolstrip||Top of desktop|
By default, the toolstrip includes three tabs, Home, Plots, and Apps.
|Current Folder Toolbar||Top of desktop underneath toolstrip|
View and change the current folder.
|Current Folder Browser||Left side of desktop|
Manage files and folders in MATLAB. Actions include viewing, creating, opening, moving, and renaming files and folders in the current folder.
|Workspace Browser||Right side of desktop|
View and manage the contents of the workspace in MATLAB.
|Command Window||Middle of desktop|
Enter individual statements at the command line and view the resulting output.
In MATLAB Online™ and on systems with a lower screen resolution, MATLAB defaults to a two-column layout with the Workspace browser on the left side of the desktop, underneath the Current Folder browser.
To change the desktop layout, you can choose from a set of preconfigured desktop layouts or you can create your own layout by hiding, minimizing, and undock individual tools. You also can change the layout of documents within a tool by undocking, reordering, or tiling them. Then, you can save your layouts and reuse them again at a later time.
MATLAB provides a set of preconfigured desktop layouts that are optimized for certain workflows. To select a preconfigured layout, on the Home tab, in the Environment section, click Layout. Then, in the Select Layout section, select a layout. To restore the MATLAB desktop to its default layout, select Default.
For example, if you work mostly in the Command Window, select the All But Command Window Minimized option to maximize the Command Window and minimize all other tools in the desktop.
To hide a tool, click the button on the title bar of a tool and select Close. To hide just the title bar for a tool, on the Home tab, in the Environment section, click Layout. Then, in the Show section, clear Panel Titles.
In MATLAB Online, hiding tools is not supported. To optimize your desktop layout, minimize tools instead.
Minimize tools in the desktop to optimize the layout while still maintaining quick access to tools that you use periodically.
To minimize the toolstrip, at the lower right corner of the toolstrip, click . The toolstrip minimizes but the tabs remain visible. To restore the toolstrip, select one of the tabs to display the toolstrip, and then, in the lower right corner of the toolstrip, click .
To minimize other tools including the Current Folder browser, Command Window, Editor, and Live Editor, on the title bar of the tool, click the button and select Minimize. The minimized tool appears along the edge of the desktop indicated by the arrow in the Minimize icon. For example, the minimize icon indicates that the tool minimizes to the right edge of the desktop by default. To move a minimized tool to a different edge of the desktop, drag the tools to the desired location.
For example, to minimize the Current Folder browser, at top right of the Current Folder browser, click the button and select Minimize. The Current Folder browser minimizes to the left side of the screen.
To open a minimized tool temporarily on the desktop, click the tool. To restore the tool to its original size, double click the tool. You also can click the button and select Restore.
In MATLAB Online, to minimize a tool, collapse the panel where the tool resides. For example, if the MATLAB Online desktop is in the default layout with the Current Folder browser in the left panel, hide the Current Folder browser by clicking the button at the bottom left corner of the panel. To restore it, click the button. If the left or right panel contains multiple tools, you can minimize an individual tool by clicking the button to the left of its title bar. Multiple tools in the bottom panel display as tabs and cannot be minimized.
To open tools that you previously hid, on the Home tab, in the Environment section, click Layout. Then, in the Show section, select the desktop tool that you want to show on the desktop.
You also can open some tools programmatically using a function. For example, to
open the Editor, use the
edit function. To open the Workspace
browser, use the
Undock tools to open them in a separate window and move them outside the MATLAB desktop. To undock a tool, on the title bar of the docked tool, click the button and select Undock. Alternatively, drag the tool by its title bar to a new location outside of the MATLAB desktop. To move an undocked tool back into the desktop, at the upper right of the undocked tool, click the button, and select Dock.
You also can undock individual documents within a tool such as an individual
script file open in the Editor. To undock an individual document, right-click the
document tab and select Undock. You also can click the button on the title bar of the tool and select
For example, if you have the file
fact.m open in the Editor, to
undock just that file, on the title bar of the Editor, click the button and select Undock
fact.m. MATLAB opens
fact.m in a separate window and leaves the
Editor docked in the desktop. To move the file back into the desktop, at the top
right of the undocked file, click the button and select
Dock. If you have multiple undocked documents and want to
move them all back into the desktop, select Dock All in
Undocked tools and documents appear on the Windows® task bar, or the equivalent for your platform. Click the task bar icon for a tool or document to make it active.
Undocking tools and documents is not supported in MATLAB Online.
When you open MATLAB documents, they open in the associated tool, such as the Editor, Live Editor, or Variables editor. Individual documents open as separate tabs within the tool. To optimize the layout of multiple documents, you can reorder or tile them. You also can change where the tabs appear within a tool.
By default, the tabs appear at the top of the document. To reorder individual document tabs within a tool, drag the tabs to a different position. To reorder document tabs alphabetically, on the View tab, in the Document Tabs section, select Alphabetize.
To change the position of the tabs in a tool, on the View tab, click Tabs Position and select from the available options. For example, to display tabs on the side of the Editor instead of at the top, with the Editor open, go to the View tab, click Tabs Position, and select Left. MATLAB displays the Editor tabs of the left side of the tool.
To view multiple documents at once in a tool, you can tile the documents. To tile documents in the Editor, Live Editor, and Variables editor, go to the View tab and in the Tiles section, select a tile option. For example, to view two files side by side in the Editor, go to the View tab and select the Left/Right button.
To move a tiled document, drag the document tab to another tile. If you drag it to a tile that already contains a document, the document you are dragging covers up the other document.
To tile documents in a Figure panel, Help browser, or web browser, on the right side of the title bar of the tool, select the , , , or tile option.
To tile documents In MATLAB Online, on the title bar of the tool, click , select Tile All, and then select a tile option.
When you end a session, MATLAB saves the current desktop layout. The next time that you start MATLAB, the desktop appears as you left it.
If you alternate between two or more customized desktop layouts, you can save them all to easily switch between them. To save a layout, on the Home tab, in the Environment section, click Layout, and select Save Layout. To use a saved layout, on the Home tab, click Layout, and select your saved layout. To delete or rename saved layouts, select Manage Layouts.
MATLAB stores all saved layouts in the preferences folder. MATLAB saves the current desktop layout at the end of a session in the file
Some tools, such as the Help browser, web browser, and Variables 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 more information, see Specify Startup Options. Startup options are not available in MATLAB Online.