本节书摘来自异步社区出版社《MATLAB图像处理超级学习手册》一书中的第1章,第1.3节,作者:MATLAB技术联盟 , 张岩 更多章节内容可以访问云栖社区“异步社区”公众号查看。
1.3 查询帮助命令
MATLAB图像处理超级学习手册
MATLAB用户可以在命令窗口中直接输入命令来获得相关的帮助信息,这种获取方式比联机帮助更为快捷。在命令窗口中获取帮助信息的主要命令为help、lookfor以及模糊寻找,下面将介绍这些命令。
1.3.1 help命令
直接输入help命令,会显示当前的帮助系统中所包含的所有项目。需要注意的是,用户在输入该命令后,命令窗口只显示当前搜索路径中的所有目录名称。例如:
>>help
HELP topics:
help
HELP topics:
MATLABhdlcoder\MATLABhdlcoder - (No table of contents file)
MATLABxl\MATLABxl - MATLAB Builder EX
MATLAB\demos - Examples.
MATLAB\graph2d - Two dimensional graphs.
MATLAB\graph3d - Three dimensional graphs.
MATLAB\graphics - Handle Graphics.
MATLAB\plottools - Graphical plot editing tools
MATLAB\scribe - Annotation and Plot Editing.
MATLAB\specgraph - Specialized graphs
.…… .……
vnt\vntguis - (No table of contents file)
vnt\vntdemos - (No table of contents file)
vntblks\vntblks - (No table of contents file)
vntblks\vntmasks - (No table of contents file)
wavelet\wavelet - Wavelet Toolbox
wavelet\wmultisig1d - (No table of contents file)
wavelet\wavedemo - (No table of contents file)
wavelet\compression - (No table of contents file)
xpc\xpc - xPC Target
xpcblocks\thirdpartydrivers - (No table of contents file)
build\xpcblocks - xPC Target -- Blocks
build\xpcobsolete - (No table of contents file)
xpc\xpcdemos - xPC Target -- examples and sample script files.
如果用户知道某个函数名称,并想了解该函数的具体用法,则只需在命令窗口中输入help+函数名。例如:
>>help sin
sin Sine of argument in radians.
sin(X) is the sine of the elements of X.
See also asin, sind.
Overloaded methods:
codistributed/sin
gpuArray/sin
Reference page in Help browser
doc sin
1.3.2 lookfor函数的使用
当用户不知道一些函数的确切名称时,help函数就无能为力了,这时可以使用lookfor函数解决这个问题。
在使用lookfor函数时,用户只需知道某个函数的部分关键字,在命令窗口中输入lookfor+关键字,就可以很方便地实现查找。例如:
>>lookfor sin
sin
BioIndexedFile - class allows random read access to text files using an index file.
loopswitch - Create switch for opening and closing feedback loops.
mbcinline - replacement version of inline using anonymous functions
cgslblock - Constructor for calibration Generation Simulink block parsing manager
xregaxesinput - Constructor for the axes input object for a ListCtrl
ExhaustiveSearcher - Neighbor search object using exhaustive search.
KDTreeSearcher - Neighbor search object using a kd-tree.
…… ……
sample_supported - <name>_supported fills in a single instance or an array
dxpcUDP1 - Target to Host Transmission using UDP
dxpcUDP2 - Target to Target Transmission using UDP
j1939exampleDemo - J1939 - Using Transport Protocol
scscopedemo - Signal Tracing Using Scope Triggering
scsignaldemo - Signal Tracing Using Signal Triggering
scsoftwaredemo - Signal Tracing Using Software Triggering
1.3.3 模糊寻找
MATLAB还提供一种模糊寻找的命令查询方法,只需在命令界面输入命令的前几个字母,然后按Tab键,系统便会列出所有以其开头的命令。例如,在命令窗口中输入“co”,然后按Tab键,运行结果如图1-11所示。
图1-11 模糊寻找结果