Main Content

more

Control paged output in Command Window

Description

more on enables paging of the output in the MATLAB® Command Window. When paging is enabled, MATLAB displays output one page at a time.

  • To advance to the next page of output, press the Space key.

  • To advance to the next line of output, press the Return key.

  • To stop displaying the current output, press the Q key. Do not use Ctrl+C to exit more, otherwise MATLAB can return an error.

example

more off disables paging of the output in the Command Window. By default, paging is disabled.

example

more(n) enables paging and sets the page length to n lines.

By default, the length of a page is equal to the number of lines available for display in the MATLAB Command Window. If you set the page length to a specific value, MATLAB uses that value for the page size, regardless of the size of the command window.

To restore the default page length, run the command more off followed by the command more on.

example

A = more(___) returns the current page size in number of lines. You can use this syntax with any of the input argument combinations in the previous syntaxes.

example

Examples

collapse all

Use the more function to control the number of help lines displayed in the command window.

Enable paging in the Command Window and then get help on the plot function.

more on
help plot
 plot   Linear plot. 
    plot(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
    then the vector is plotted versus the rows or columns of the matrix,
    whichever line up.  If X is a scalar and Y is a vector, disconnected
    line objects are created and plotted as discrete points vertically at
    X.
 
    plot(Y) plots the columns of Y versus their index.
    If Y is complex, plot(Y) is equivalent to plot(real(Y),imag(Y)).
--more--

Press the Space key to view the help page by page until the last page is displayed. Call more off to disable paging.

Set the page size in the Command Window and then restore the original page size.

Enable paging and set the page size to 5, storing the previous size in the variable previousSize.

previousSize = more(5)
previousSize =

     9

Display the help text for the plot function.

more on
help plot
plot   Linear plot. 
    plot(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
    then the vector is plotted versus the rows or columns of the matrix,
    whichever line up.  If X is a scalar and Y is a vector, disconnected
    line objects are created and plotted as discrete points vertically at
--more--

Use the Space key to view the help page by page until the last page is displayed.

Restore the page size and display the help for the plot function again.

more(previousSize)
help plot
 plot   Linear plot. 
    plot(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
    then the vector is plotted versus the rows or columns of the matrix,
    whichever line up.  If X is a scalar and Y is a vector, disconnected
    line objects are created and plotted as discrete points vertically at
    X.
 
    plot(Y) plots the columns of Y versus their index.
    If Y is complex, plot(Y) is equivalent to plot(real(Y),imag(Y)).
--more--

Use the Space key to view the help page by page until the last page is displayed. Call more off to disable paging.

Input Arguments

collapse all

Page size, specified as a positive integer.

Tips

  • To see the status of more, type get(0,'More'). MATLAB returns either on or off, indicating whether paging of the output is enabled or disabled.

Version History

Introduced before R2006a

See Also