Main Content

Change Desktop Layout

When you start MATLAB®, the desktop appears in its default layout.

MATLAB desktop showing the toolstrip at the top, the Current Folder toolbar below that, the Current Folder browser on the left, the Command Window in the middle, and the Workspace browser on the right

By default, the desktop includes these tools.

ToolPositionDescription
ToolstripTop of desktop

By default, the toolstrip includes three tabs: Home, Plots, and Apps.

Current Folder toolbarTop of desktop underneath toolstrip

View and change the current folder.

Current Folder browserLeft 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 browserRight side of desktop

View and manage the contents of the workspace in MATLAB.

In MATLAB Online™ and on systems with a lower screen resolution, MATLAB defaults to a two-column layout with the Workspace panel on the left side of the desktop, underneath the Files panel.

Command WindowMiddle of desktop

Enter individual statements at the command line and view the resulting output.

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 undocking 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 Online Desktop

In MATLAB Online, you can use the sidebars on either side and on the bottom of the desktop to access desktop tools and change the desktop layout. Each sidebar shows the tools, such as the Workspace panel, Files panel, or Command Window, that are docked in that area of the desktop. If there are no tools docked in an area of the desktop, the sidebar for that area is hidden.

You can use the sidebars to show and hide tools, group them together, and move them from one location to another. To show or hide a tool, click its icon in the sidebar. To show and hide multiple tools together, group them by dragging one of the tool icons next to another tool icon. To move a tool to a different location on the desktop, drag the tool or the icon for the tool to the new location.

MATLAB Online desktop showing the left sidebar containing four tool icons, two of which are grouped together and enabled, and the bottom sidebar containing one tool icon for the Command Window. The Command Window is open above the bottom sidebar. The Files panel and the Workspace panel are open on the left side of the desktop.

Select Preconfigured Layout

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 and 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 (Command Window Only in MATLAB Online) to maximize the Command Window and minimize all other tools in the desktop.

MATLAB desktop with all tools minimized except the Command Window, which is maximized

Open Tools

To open or show a tool that is not visible in the desktop, 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 workspace function.

In MATLAB Online, to show a tool that is hidden, click its icon in the sidebar. You also can show some tools by going to the Home tab, and in the Environment section, clicking the Layout button. Then, in the Layout Options section, select one or more of the options in the list. To open a tool that is not in any of the sidebars, in a sidebar, click the Open more panels button (three-dot icon). Then, in the Open Panel dialog box, select from the available tools. You also can right-click in a sidebar and select Open more panels.

MATLAB Online desktop with the Open more panels buttons circled in the left and bottom sidebars. The Open Panel dialog box shows the available tools.

Minimize Tools

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 Minimize Toolstrip button. 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 the Restore Toolstrip button.

Toolstrip with the Minimize Toolstrip icon circled

To minimize other tools including the Current Folder browser, Command Window, Editor, and Live Editor, on the title bar of the tool, click the Show Actions 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 with a left-pointing arrow indicates that the tool minimizes to the left edge of the desktop by default. To move a minimized tool to a different edge of the desktop, drag the tool to the desired location. To open a minimized tool temporarily on the desktop, click the tool. Then, to restore the tool to its original size, double-click the tool. Alternatively, you can click the Show Actions button and select Restore.

For example, to minimize the Current Folder browser, at top right of the Current Folder browser, click the Show Actions button and select Minimize. The Current Folder browser minimizes to the left side of the screen.

MATLAB desktop with the Current Folder browser minimized

In MATLAB Online, to minimize a tool, click its icon in the sidebar. If two or more tools are grouped together, you can minimize each individual tool by clicking the Collapse button on the left side of its title bar.

For example, if the MATLAB Online desktop is in the default layout with the Files panel and Workspace panel open on the left side of the desktop, you can hide both tools by clicking the icon group for the two tools in the left sidebar. You can minimize just the Files panel by clicking the Collapse button on the left side of its title bar.

MATLAB Online desktop with the Files panel collapsed and the Workspace panel expanded. The Files panel and Workspace panel icon group and the Files panel Collapse button are circled.

To minimize tools that open in new windows in MATLAB Online, see Manage Windows in MATLAB Online.

Hide Tools

To hide a tool, click the Show Actions button on the title bar of a tool and select Close. You also can hide some tools by going to the Home tab, and in the Environment section, clicking the Layout button. Then, in the Show section, clear one or more of the options in the list. To hide just the title bar for all tools, clear the Panel Titles option.

In MATLAB Online, to hide a tool, click its icon in the sidebar. You also can hide some tools by going to the Home tab, and in the Environment section, clicking the Layout button. Then, in the Layout Options section, clear one or more of the options in the list.

Undock Tools and Documents

To open a tool in a separate window, undock the tool to move it outside the MATLAB desktop. To undock a tool, on the title bar of the docked tool, click the Show Actions 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 Show Actions 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 document. Alternatively, you can click the Show Actions button on the title bar of the tool and select Undock document. 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.

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 Show Actions 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 Show Actions button and select Dock fact.m. If you have multiple undocked documents and want to move them all back into the desktop, select Dock All in tool.

Undocked document fact.m

In MATLAB Online, undocking tools and documents is not supported.

Reorder and Tile Documents

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.

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. In MATLAB Online, to alphabetize document tabs, on the title bar of the tool, click the Document Actions button and select Alphabetize.

By default, the tabs appear at the top of the document. 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 left side of the Editor instead of at the top, with the Editor open, go to the View tab, click Tabs Position, and select Left. In MATLAB Online, to change the position of the tabs in a tool, click the Document Actions button, select Tabs Position, and select from the available options.

Editor with document tabs on the left

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. 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.

For example, to view two files side by side in the Editor, go to the View tab and select the Left/Right button.

Editor with two documents displayed side by side using a left/right tile layout

To tile documents in the Figures panel or MATLAB web browser, at the top right of the tool, select the Tile, Left/Right tile, Top/Bottom tile, or Maximize option button.

In MATLAB Online, to tile documents, on the title bar of the tool, click the Document Actions button, select Tile All, and then select a tile option.

Save Desktop Layouts

When you end a session, MATLAB saves the current desktop layout. The next time 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 (or Save Current Layout in MATLAB Online). MATLAB stores all saved layouts in the preferences folder. MATLAB saves the current desktop layout at the end of a session in the file MATLABDesktop.xml.

To use a saved layout, on the Home tab, click Layout, and select your saved layout. To delete or rename saved layouts, select Organize Layouts. In MATLAB Online, right-click the layout and select Delete or Rename from the context menu.

Some tools, such as the MATLAB web browser and the 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.

See Also

Related Topics