Main Content

more

控制命令行窗口中的分页输出

说明

示例

more on 可启用 MATLAB® 命令行窗口的分页输出。启用分页时,MATLAB 一次显示一页输出。

  • 要前进到下一页输出,请按空格键

  • 要前进到下一行输出,请按 Return 键。

  • 要停止显示当前输出,请按 Q 键。不要使用 Ctrl+C 退出 more,否则 MATLAB 会返回错误。

示例

more off 可禁用命令行窗口的分页输出。默认情况下,分页处于禁用状态。

示例

more(n) 启用分页并将页面长度设置为 n 行。

默认情况下,一页的长度等于 MATLAB 命令行窗口中可显示的行数。如果将页面长度设置为特定值,MATLAB 会将该值设为页面大小,无论命令行窗口大小如何。

要恢复默认页面长度,请运行命令 more off,然后运行命令 more on

示例

A = more(___) 以行数形式返回当前页面大小。您可以将此语法与上述语法中的任何输入参量结合使用。

示例

全部折叠

使用 more 函数可以控制命令行窗口中显示的帮助行数。

在命令行窗口中启用分页,然后获取 plot 函数的帮助。

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--

空格键逐页查看帮助,直到显示最后一页。调用 more off 以禁用分页。

设置命令行窗口中的页面大小,然后恢复原始页面大小。

启用分页并将页面大小设置为 5,从而将先前的大小存储在变量 previousSize 中。

previousSize = more(5)
previousSize =

     9

显示 plot 函数的帮助文本。

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--

使用空格键逐页查看帮助,直到显示最后一页。

恢复页面大小并再次显示 plot 函数的帮助。

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--

使用空格键逐页查看帮助,直到显示最后一页。调用 more off 以禁用分页。

输入参数

全部折叠

页面大小,指定为正整数。

提示

  • 要查看 more 的状态,请键入 get(0,'More')。MATLAB 返回 onoff,指示是启用还是禁用分页输出。

版本历史记录

在 R2006a 之前推出

另请参阅