| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
Navigating Among Open Documents Using the Document Bar |
Use the document bar to go to a document that is open, but not in view. The names of all open documents appear on the document bar. Click the document name to open the document. If the document bar is not open, select Desktop > Document Bar > Bar Position and select the position for it, for example, Right. For more information, see Navigating Among Open Documents Using the Document Bar.
Entries for undocked documents appear on the Windows task bar, or the equivalent for your platform. Click the task bar entry for a document to make that document active.
When you open MATLAB documents, they open in the associated tool and appear in the position they occupied when last used. Figures open undocked, regardless of the last position occupied. If the tool is not already open, it opens when you open the document.
How you open a document depends on the document type, as described in the following table.
Document Type and Tool | How to Open Document | Where Document Appears by Default | Other Techniques to Open Document |
|---|---|---|---|
M-file (or other text file) in the Editor | Click the Open file button
| In the last location of the Editor. The default location for the Editor is outside the desktop. | |
Variable in the Variable Editor | Double-click a variable in the Workspace browser. | In the last location of the Variable Editor. The default location of the Variable Editor is docked on the desktop. | |
HTML or similar page in the Web browser | Double-click the file name in the Current Folder browser. | In the last location of the Web browser, replacing the existing Web browser document. | |
Figure | Use the plot function. | In a figure window, outside the desktop. | Any other function or tool that creates a figure window. |
Some common actions for working with documents on the desktop are:
Select a document from the document bar, making it the active open document.
Use the Window menu or equivalent toolbar buttons to position documents.
Close or undock a tool, including all documents in the tool.
Undock a document from its tool.
Use the document Close box with the Ctrl key to close the document without saving it and without displaying the unsaved document dialog box.
See also Examples of Desktop Arrangements.

When you have more than one document open in a tool, each document appears either maximized (the default), tiled, or floating (cascading). Tiled and floating arrangements make multiple documents visible simultaneously. The document bar shows the names for all open documents docked together in a tool.
To make a document that is open and in view active, click it.
To make an open document that is not in view active, do one of the following:
Select the document from the document bar.
If all the document names do not fit on the document bar, use
the More
Documents button
on the document bar. This button enables
you to see the names of additional open documents. Hover over the
arrow to scroll automatically through all the names, or click the
arrow to move quickly through the names.
From the Window menu, select the document name.
From the Window menu, select Next Tab to make the next document on the document bar active (relative to the currently active document).
From the Window menu, select Previous Tab to make the previous document on the document bar active (relative to the currently active document).
See also Performing Desktop Actions Using the Keyboard.
You can show, hide, move, alphabetize, and adjust the size of the tabs in the document bar as described in the following table.
| To Accomplish This: | Do This: |
|---|---|
Show the document bar. | Select Desktop > Document Bar > Bar Position, and then select a location, for example, Right. |
Hide the document bar. | Select Document Bar > Bar Position > Hide from the Window menu or the document bar context menu. |
Move the document bar. | Do one of the following:
|
Alphabetize the names of the documents on the document bar. Alphabetizing is useful if you have many documents open at once. | Do one of the following:
|
Reorder document names on the document bar. | Do one of the following:
|
Widen or narrow document names on the document bar. If document names are long, or if you have many documents open, the entire document name does not display. Instead, you see the first few characters followed by ellipsis (...). | Do one of the following:
|
You can position open documents so that one document or multiple
documents are in view from within a tool. Select the arrangement from
the Window menu or use the Arrange Documents
drop-down menu
, as described
in the sections that follow. When you tile documents,
they are all visible within the tool, arranged in a grid pattern.
To have one document in view that occupies the entire tool (the default), do one of the following:
Select Window > Maximize.
From the Arrange Documents drop-down
menu, choose the Maximize option
.
The illustration in Example of Working with Documents on the Desktop shows this arrangement.
You can use the Float or Cascade options to layer open documents one on top of another. To do this, use one of the following methods:
Select Window > Float.
In the Arrange Documents drop-down
menu, choose the Float option
.
Optionally, select Window > Cascade to make the document arrangement neater.
You can use the Tile option to view two documents side-by-side. To do this, use one of the following methods:
Select Window > Left/Right Tile.
In the Arrange Documents drop-down menu, choose the
Left/Right Tile option
.
See also the Editor Split Screen Display that enables you to view two different parts of the same file simultaneously.
You can use the Top/Bottom Tile option to view two documents stacked one above the other by using one of the following methods:
Select Window > Top/Bottom Tile.
In the Arrange Documents drop-down menu, choose the
Top/Bottom Tile option
.
See also the Editor Split Screen Display that enables you to view two different parts of the same file simultaneously.
To have all open documents in view, tiled within the tool, follow these steps:
Select the tiling option using one of these methods:
Select Window > Tile.
On the Apple Macintosh platform, this option might be unavailable, so use the drop-down menu instead.
In the Arrange Documents drop-down
menu, choose the Tile option
.
A four-by-four grid displays.
Move the pointer across the grid to define the number and position of the tiles, as shown in the following illustration.
You can select more or fewer tiles than there are open documents. In the example, there are three open documents, but you must select four tiles to make a square grid shape. The tiles that will contain documents appear blue, whereas the tiles that will be empty appear gray.
This example shows how to select an arrangement so that all three documents will be in view. The resulting arrangement has two documents above, one below, and one empty tile.

The following arrangement shows three documents tiled in the Editor. The Editor is undocked from the desktop.

To close an empty tile, move the pointer over the handle
on the separator bar, and then click the Close
box that appears. If you click the handle between two open documents,
both documents stay open, but one moves on top of the other.

To view only a subset of all your open documents displayed in tile format, follow these steps:
Select Window > Tile ....
The Tile dialog box opens.
Indicate the documents you want to view and the grid pattern to use for the arrangement of their display.
The following illustrations show how to specify the arrangement for three variables in three rows in the Variable Editor, and the resulting configuration.


You can move and resize documents to organize them as you want, as described in the following table.
| To Accomplish This: | Do This: |
|---|---|
| Minimize all open documents in a tool | Make that tool active, and then select Window > Minimize Toolname Documents |
| Float documents | Select Windows > Float. |
| Minimize (hide) a floating document | Click the minimize button
|
| Access a minimized document | Select its name from the document bar or the Window menu. |
| Move or resize a maximized document | Move or resize the tool that contains it. |
| Make a document larger when it is next to an empty tile | Hover over the handle on the separator bar, and then click the Close box that appears. |
| Resize tiled documents | Drag the separator bar that is between the documents. |
| Move tiled documents | Drag the title bar of the document 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. |
There are many ways to close a document. Use any of the following methods:
Click the Close box
in the title bar for the tool.
Right-click the title bar for the document, and then select the Close option.
Right-click the name of the document in the document bar, and then select one of the Close options.
Click the Close box
next to the name of the document in
the document bar.
Place the mouse pointer over the name of the document in the document bar, and then click the middle mouse button. (Works on Microsoft Windows and Linux® only.)
Select Window > Close Toolname Documents.
Select File > Close Current_Document_Name.
For an undocked document or tool, right-click the Windows task bar entry (or equivalent for your platform) and select Close.
When there are open documents, undocked from within their tools, close all open documents and the tool by selecting Window > Close All Documents from the desktop.
For example, in the undocked Editor, select Window > Close Documents to close all documents in the Editor. The Editor remains open with no documents in it, and any undocked Editor documents remain open.

In the Editor, when you close a file that has unsaved changes, a prompt appears asking if you want to save the document. To close a file without saving changes and without seeing the save prompt, use Ctrl when you click the Close box for the document.
You can move a tool outside of the MATLAB desktop (called undocking) to make it larger or easier to work with. For example, you can move the Help browser outside of the desktop when referring to the online documentation.
To move a tool outside the desktop, do one of the following:
Click the Undock arrow
on the title bar
of the tool you want to move outside the desktop.
Make the tool you want to move outside the desktop active. Then for that tool, select Desktop > Undock.
Drag the title bar of the tool outside the desktop. As you drag the title bar, an outline of the tool appears outside of the desktop. When the outline appears where you want the tool to be, release the mouse.
The tool displays outside the MATLAB desktop and an entry for it appears in the Windows task bar. Tools within the desktop automatically resize accordingly.
To dock documents and their associated tool, click the Dock
button
on
the menu bar for the tool.
If you dock a tool that includes documents, the tool and the documents within the tool move onto the desktop. For example, when you dock the Editor and it has open files, both the Editor and the documents move onto the desktop.
When you dock a document, it moves to the position in the tool that it occupied before you undocked the document.
To group all the documents for a tool outside of the desktop, undock the tool from the desktop, not just the individual documents.
If you have already undocked all the documents and closed the empty tool that had contained them, follow these steps:
Select Desktop > Dock All in Editor, for example.
This selection moves all the documents into the tool in the desktop.
Undock the tool.
![]() | Opening and Arranging Desktop Tools | Managing Desktop Layouts | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |