官术网_书友最值得收藏!

1.3 查詢幫助命令

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 模糊尋找結果

主站蜘蛛池模板: 宜州市| 无极县| 石屏县| 延寿县| 忻城县| 任丘市| 西城区| 荆州市| 富民县| 广平县| 永顺县| 安陆市| 韩城市| 孝义市| 禹城市| 泸定县| 衡水市| 光泽县| 襄樊市| 江华| 平陆县| 许昌市| 霍邱县| 安平县| 隆化县| 宝丰县| 沈阳市| 富裕县| 麟游县| 镇雄县| 平乐县| 黎平县| 顺昌县| 紫云| 手游| 库尔勒市| 通许县| 元阳县| 缙云县| 周宁县| 恩平市|