Arranging the Desktop

About Arranging the Desktop

You can modify the desktop configuration to best meet your needs. Refer to Arranging the Desktop first, and then if needed, consult the details in these sections.

Opening Desktop Tools

To open a tool, select the tool from the Desktop menu. Open tools have a check mark before them in the menu. The tool appears in the location it occupied the last time it was open. The sizes of other open tools adjust to accommodate the newly opened tool. If you close and then open multiple tools sequentially, the location and size when you open them might not be the exactly the same as when you last closed them.

Documents and the tools they are associated with can be part of the desktop. You can open a document and its associated tool as follows:

You can also open most desktop tools by

The following example shows how the MATLAB® desktop might look with the Command Window, Command History window, Help browser, and the files collatz.m and lengthofline.m open. Because the Command Window is the active window, its title bar is dark blue. By default, the Help browser does not open in the desktop, although you can move it into the desktop (dock it).

Image of desktop configuration described.

Navigating Among Desktop Tools

The Window menu displays all open desktop tools and documents. Select an entry in the Window menu to go directly to that tool or document. The tool becomes the active window, and when you type, the focus will be there.

This is an example of the Window menu when the Command Window, Command History window, Help browser, and the files collatz.m and lengthofline.m are open.

Image of Window menu. It includes the list of open tools and documents providing easy access to any of them.

Use shortcuts and mnemonics to go to a specific tool. For example, type Ctrl+0 to make the Command Window active and Ctrl+Shift+0 to go to the most recently used Editor document. To go to a specific document, type Alt+W and then the mnemonic identifier, for example, A to go to the file collatz.m. Note that the mnemonic identifier for documents is temporary. For example, if you close collatz.m and open it later, the mnemonic might not be A.

Undocked desktop tools also have entries in the Microsoft® Windows® task bar, or the equivalent for your platform. Click the task bar entry for a tool to make that tool active.

You can also run the function that opens a tool, and if the tool is already open, that selects the tool. For example, type helpbrowser to go to the Help browser. These functions are documented with each tool.

Closing Desktop Tools

To close a desktop tool, do one of the following:

Other tools in the desktop adjust their sizes accordingly.

For tools that contain documents, all documents in that tool close as well. For the Editor, a dialog box appears asking you to save any documents that have unsaved changes. If you do not want to see that dialog box and do not want to save any unsaved changes for Editor documents, hold Ctrl and click the Close box.

Resizing Tools

To resize tools in the MATLAB desktop, use the separator bar, which is the bar between tools or documents. Move the pointer onto the separator bar. The pointer assumes a different shape. When between two tools or documents, it is a double-headed arrow Image of two tools side-by-side in the desktop, highlighting the use of the separator bar for resizing the tools. on Windows platforms, and an arrow with a bar on UNIX® platforms. When between three or four documents, it is a four-headed arrow . Drag the separator bar to change the sizes of the tools.

To resize the MATLAB desktop itself or any tool outside the desktop, use the convention for your platform. For example, on Windows platforms, drag any edge or corner of the desktop window.

You can also use menu item mnemonics to resize desktop tools using the keyboard. For example, if the Command Window is in the desktop along with other tools, to make the Command Window the active tool, press Ctrl+0 (or click in it). Then press Alt+D, Z, which is the mnemonic equivalent for selecting Desktop > Resize Command Window. The pointer shape becomes an arrow. Use the arrow keys to change the size of the Command Window. Press Enter to accept the new size, or press Esc to return the Command Window to its original size.

Moving Tools Within the Desktop

To move a tool to another location in the MATLAB desktop, drag the title bar of the tool toward where you want the tool to be located.

As you drag the tool, an outline of it appears. When the outline nears a position where you can dock (keep) it, the outline snaps to that location. Release the mouse button. While you drag the outline, the status bar displays instructions about moving the tool. The inside edges of the desktop container and the edges of all tools all act as if they are "sticky," so you can dock a tool along any inside edge.

In the following example, the Command History window is originally to the left of the Command Window and is being dragged above the Command Window. When the top of the Command History window touches the bottom of the toolbar, the outline appears.

Image of Command History being dragged to a new position.

Other tools in the desktop resize to accommodate the new configuration. The following example shows how the desktop looks after the Command History window was moved above the Command Window.

Image of Command History above the Command Window.

You can also use menu item mnemonics to move desktop tools using the keyboard. For example, if the Command Window is in the desktop along with other tools, to make the Command Window the active tool, press Ctrl+0, or click in it. Then press Alt+D, V, which is the mnemonic equivalent for selecting Desktop > Move Command Window. The pointer shape becomes an arrow. Use the arrow keys to move the outline of the Command Window to a new dockable location. Press Enter to dock it at the new location, or press Esc to return the Command Window to its original position.

Moving Tools Out of the Desktop (Undocking)

Move a tool out of the desktop to make it larger or easier to work with. For example, you might want to move the Help browser outside of the desktop when referring to the online documentation.

To move a tool outside the MATLAB desktop (called undocking), do one of the following:

The tool appears outside the MATLAB desktop and an entry for it appears in the Windows task bar. Tools within the desktop resize accordingly.

Moving Tools into the Desktop (Docking)

To move a tool that is outside the MATLAB desktop into the desktop, click the Dock arrow in the tool's menu bar, or select Dock from the tool's Desktop menu. The tool moves into the desktop and other tools in the desktop resize to accommodate the new tool.

Grouping Tools Together

You can group tools so that they occupy the same location in the MATLAB desktop, and then access the individual tools via the tool's name in the titlebar:

To group tools together,

  1. Drag the title bar of one tool in the desktop on top of another tool in the desktop.

    The outline of the tool you are dragging overlies the target tool.

    Image of Command History being dragged on top of Command Window.

  2. Release the mouse.

    Both tools occupy the same space and labeled tabs appear at the bottom of that space.

    Image of Command Window and Command History grouped together.

To view a grouped tool, click the tool's name in the title bar (or any part of the tool's title bar). The tool moves to the foreground and becomes the currently active window.

When you click the Close box for a tool that grouped with other tools, that tool closes. You cannot close all the grouped tools at one time; instead close each tool individually.

Right-click the title bar for a tool and use the context menu to close, undock, maximize, or minimize the tool.

Opening Documents

When you open documents used by MATLAB, they open in the associated tool. If the tool is not already open, it opens when you open the document.

How you open a document depends on the document type.

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 desktop toolbar and select the file.

In the last location of the Editor. The default location is outside of the desktop.

Opening Existing Files in the Editor

Variable in the Variable Editor

Double-click a variable in the Workspace browser.

In the last location of the Variable Editor. The default location is docked in the desktop.

Opening the Variable Editor

HTML or similar page in the Web browser

Double-click the filename in the Current Directory browser.

In the last location of the Web browser, replacing the existing Web browser document.

Web Browser

Figure

The plot function.

In a figure window, outside of the desktop.

Any other function or tool that creates a figure window.

Navigating Among Documents — The Document Bar

When you have more than one document open in a tool, each document is either maximized (the default) or positioned so that multiple documents are visible at once.

Click a document that is in view to make it the active document.

To go to an open document that is not in view, select the document name from the Window menu, or from the document bar.

To show the document bar, select Desktop > Document Bar > Bar Position, and select a location, for example, Right. To hide it, select Document Bar > Bar Position > Hide from the Window menu or the document bar context menu.

The document bar shows the names for all open documents docked together in a tool. Select a document name in the document bar to make that document active. You can drag the document bar to another location, or select the new location from the Desktop > Document Bar > Bar Position submenu.

If all the document names do not fit in the document bar, use the More Documents arrow button in the document bar to access additional open documents. Hover over the arrow to automatically scroll through all of the names, or click the arrow to quickly move through the names.

By default, the document bar displays a document name using 1/8 of the screen width. If document names are long, or if you have many documents open, the entire document name does not display, but instead, you see the first few characters followed by .... To make a name wider or narrower, for example, to see the entire name, drag the separator bar between two names on the bar when the document bar is on the top or bottom. When the document bar is on the left or right, change the width of the bar by dragging its left or right edge.

To alphabetize the names of the documents in the document bar, right-click in the document bar and select Alphabetize, or select it from the Desktop > Document Bar menu. This is useful if you have many documents open at once. You can also reorder the names by dragging: drag a name to a different position in the document bar. Another way to move document names is to select Move documentname On Bar and select a direction, such as to Beginning from either the Desktop > Document Bar menu or from the document bar context menu.

You can close a document by clicking its Close box in the document bar.

Undocked documents have entries in the Windows task bar. Select an entry to make that document active.

Positioning, Moving, and Resizing Documents

You can position open documents so that only one document or multiple documents are in view within their tool. Select the arrangement from the Window menu or use the buttons on the toolbar. Arrangements are

Select Window > Minimize Toolname Documents to "hide" all open documents in that tool. When you select the Float option, you can minimize (hide) a document using the Minimize button in the title bar. To access a minimized document, select its name from the document bar or the Window menu.

To move or resize a maximized document, you actually move or resize the tool.

Resize a floating document by dragging any edge or corner of the window on Windows platforms, or use the convention for your platform. Drag the title bar of a floating document to move it.

To resize documents that use a tiled arrangement, drag the separator bar that is between the documents.

To move a document in a tiled arrangement, drag the title bar of a 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.

If a document is next to an empty tile, you can make the document larger and close the empty tile. Move the pointer onto the handle on the separator bar and click the Close box that appears.

Closing Documents

To close a document, click the Close box in that document's title bar. If you select the Close box for the tool, all documents in that tool close. See the following illustration for an example. For Editor documents, if you have unsaved changes, a dialog box appears asking if you want to save the document. If you do not want to see the dialog box and do not want to save any unsaved changes, hold Ctrl and click the Close box.

You can also close documents using any of these methods:

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.

For an undocked document or tools, you can right-click the task bar entry and select Close.

When there are open documents that are not docked within their tools, close all open documents and document tools by selecting Window > Close All Documents from the desktop.

Image of document in tool, highlighting the close box for the tool (in the tool's title bar), and the close box for the document (in the document's title bar).

Moving Documents and Tools Out of the Desktop (Undocking)

You can undock tools from the desktop (which includes all the documents within it), undock documents from their tools in the desktop, and undock documents from undocked tools. To undock, select the undock arrow for the item from the item's title bar, or use the Undock items from the Desktop menu when the tool is active.

The tool or document moves outside of the desktop and an entry for it appears in the Windows task bar, or the equivalent for your platform. Each type of document has a unique icon in the task bar entry.

If you undock every document from a tool, that tool remains open but "empty."

Docking Documents and Tools

To dock a tool, click the dock arrow in the tool's menu bar. If you dock a tool that includes documents, for example the Editor and its files, the tool and the documents in the tool move into the desktop.

If a document is outside of its tool, click the dock arrow in the document's menu bar, or select Desktop > Dock Documentname to move the document into the tool.

To dock all of the documents for a tool together outside of the desktop, dock them all in the desktop, then undock the tool.

Use the document bar in the tool to access documents.

Saved Desktop Layouts

When you end a session, MATLAB saves the desktop layout. The next time you start MATLAB, the desktop is restored the way you left it. This includes reopening any Editor documents you had open.

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

Any layouts you save are stored as XML files in the preferences directory for MATLAB. The layout last used in a session is MATLABDesktop.xml. Type prefdir in the Command Window to display the location of the XML files. The MATLABDesktop.xml file is loaded when MATLAB starts and is overwritten when you close MATLAB.

Predefined Layouts

Select a predefined MATLAB desktop layout from the Desktop > Desktop Layout menu. Document tools already open in the desktop remain open.

After selecting a predefined layout, you can move, resize, and open and close tools.

Saving Your Own Desktop Layouts

You can save a desktop layout and use it again at a later time. Select Desktop > Save > Layout to save the current layout. Assign a name to the layout in the resulting dialog box and click OK. To reuse the layout, select Desktop > Desktop Layout and then select the layout name.

To rename or delete a saved layout, select Desktop > Organize Layouts. In the resulting dialog box, select a layout, click the Rename or Delete button, and click Close. When renaming, type the new name over the existing name.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS