Change Desktop Layout
When you start MATLAB®, the desktop appears in its default layout.
By default, the desktop includes these tools:
Tool | Position | Description |
---|---|---|
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. 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 Window | Middle 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.
In MATLAB Online, you also can use the sidebars on either side of the desktop to access desktop tools and change the desktop layout. The sidebars show the tools, such as the Workspace panel and the Files panel, that are docked on either side of the desktop. If there are no tools docked on one side, the sidebar for that side is hidden. You can use the sidebars to show and hide tools, group them together, and move them from one location to another.
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.
Hide Tools
To hide a tool, click the button on the title bar of a tool and select
Close. You also can close 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. You also can optimize your desktop layout by minimizing 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 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
button.
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. Alternatively, you can click
the button and select
Restore.
In MATLAB
Online, to minimize a tool, click its icon in the sidebar. For example, if
the MATLAB
Online desktop is in the default layout with the Files panel and Workspace
panel open in the left sidebar, you can hide both tools by clicking the icon group
for the two tools. If the left or right sidebar contains multiple tools, you can
minimize an individual tool by clicking the Collapse button to the left of its title bar.
Open Tools
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 workspace
function.
Undock Tools and Documents
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. Alternatively, you can
click the button on the title bar of the tool and select
Undock
document
.
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
tool
.
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.
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. 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. In MATLAB
Online, to alphabetize document tabs, on the title bar of the tool, click the button and 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. In MATLAB
Online, to change the position of the tabs in a tool, click the button, select Tab
Position, and select from the available options.
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. In MATLAB
Online, to tile documents, on the title bar of the tool, click the
button, select Tile
All, and then 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.
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
option button.
Save Desktop Layouts
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 (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 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.