| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
The Command Window is one of the main tools you use to enter data, run MATLAB code, and display results. If you have an active Internet connection, you can watch the Working in the Development Environment video demo for an overview of the major functionality.
When the Command Window is not open, access it by selecting Command Window from the Desktop menu. Alternatively, open the Command Window with the commandwindow function.
If you prefer a simple command-line interface without the other MATLAB desktop tools visible, select one of the following:
Desktop > Desktop Layout > Command Window Only
The desktop contains only the Command Window, as shown in the image that appears after this list.
Desktop > Desktop Layout > All but Command Window Minimized
All tools open and are minimized in the desktop, except the Command Window, which is maximized. The Editor also remains maximized if it was open and contained a document at the time you chose the All but Command Window Minimized menu item.
For more information, see Opening and Arranging Desktop Tools.

To restore the desktop to the default arrangement, select Desktop > Desktop Layout > Default.
Enter statements at the Command Window prompt. The prompt indicates that MATLAB is ready to accept input from you. This prompt is also known as the command line.
The prompt can be any one of the following:
>> — Indicates that the Command Window is in normal mode.
EDU>> — Indicates that the Command Window is in normal mode, in MATLAB Student Version.
K>> — Indicates that MATLAB is in debug mode.
Type dbquit to return to normal mode. For more information, see Editing and Debugging MATLAB Code
There are various ways you can change how the Command Window looks. The following table provides links to sections that describe how.
| Action | See This Section |
|---|---|
| Move or resize the Command Window. | Opening and Arranging Desktop Tools |
| Change fonts in the Command Window. | Setting Fonts Preferences for Desktop Tools |
| Show and hide buttons, wrap lines, and similar details. | Preferences for the Command Window |
![]() | Running Functions — Command Window and History | Running Functions and Programs, and Entering Variables | ![]() |

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