Desktop Tools and Development Environment Previous page   Next Page

Controlling Output

Echoing Execution

To display each function within a statement as it executes, run echo on. For details, see the echo reference page.

Suppressing Output

If you end a statement with a semicolon ( ; ) and then press Enter or Return, MATLAB runs the statement but does not display any output. This is particularly useful when you generate large matrices. For example, running

A = magic(100);

creates A but does not show the resulting matrix in the Command Window.

Paging of Output in the Command Window

If output in the Command Window is lengthy, it might not fit within the screen and display too quickly for you to see it without scrolling back to it. To avoid that problem, use the more function to control the paging of output in the Command Window. By default, more is off.

After you type more on, MATLAB displays only a page (a screen full) of output, pauses, and displays

--more--

indicating there is more output to display. Press one of the following keys.

Key
Action
Enter or Return
To advance to the next line
Space Bar
To advance to the next page
q
To stop displaying the output

You can scroll in the Command Window to see input and output that are no longer in view. As an alternative to scrolling, you can use the up and down arrow keys if the Command Window Accessibility preference is selected.


Previous page  Navigating Above the Command Line Formatting and Spacing Numeric Output Next page

© 1994-2005 The MathWorks, Inc.