| MATLAB® | ![]() |
As an alternative to the doc function, use the Help browser search field. Type the function name and press Enter.
doc
doc functionname
doc toolboxdirname
doc toolboxdirname/functionname
doc classname.methodname
doc userclassname
doc opens the Help browser, if it is not already running, or brings the window to the top, displaying the Contents pane when the Help browser is already open.
doc functionname displays the reference page for the MATLAB function functionname in the Help browser. For example, you are looking at the reference page for the doc function. Here functionname can be a function, block, property, method, or object. If functionname is overloaded, that is, if functionname appears in multiple directories on the search path MATLAB uses, doc displays the reference page for the first functionname on the search path and displays a hyperlinked list of the other functions and their directories in the MATLAB Command Window. Overloaded functions within the same product are not listed — use the overloaddirectory form of the syntax. If a reference page for functionname does not exist, doc displays its M-file help in the Help browser. The doc function is intended only for help files supplied by The MathWorks™, and is not supported for use with HTML files you create yourself; to display HTML files for functions you create, use the web function.
doc toolboxdirname displays the roadmap page for toolboxdirname in the Help browser, which provides a summary of the most pertinent documentation for that product located in toolboxdirname. toolboxdirname is the directory name for a product in matlabroot/toolbox. If you do not know toolboxdirname for a product, run which functionname, where functionname is the name of a function in that product; MATLAB returns the full path to functionname, and toolboxdirname is the directory after matlabroot/toolbox.
doc toolboxdirname/functionname displays the reference page for the functionname that belongs to the specified toolboxdirname, in the Help browser. This is useful for overloaded functions.
doc classname.methodname displays the reference page for the methodname that is a member of classname.
doc userclassname displays the help comments from the class definition M-file in an HTML format in the Help browser. To go directly to help for a method, property, or event of classname, use dot notation, as in doc userclassname.methodname. For more information, see Help for User-Created Classes.
Note If there is a function called name as well as a toolbox directory called name, the roadmap page for the toolbox directory called name displays. To see the reference page for the function called name, use doc toolboxdirname/name, where toolboxdirname is the name of the toolbox directory in which the function name resides. For example, doc matlab displays the roadmap page for MATLAB (that is, the matlab toolbox directory), while doc matlab/matlabunix displays the reference page for the matlab startup function for UNIX[1] platforms, which is in the MATLAB product. |
Run doc abs to display the reference page for the abs function. If the Simulink and Signal Processing Toolbox™ products are installed and on the search path, the Command Window lists hyperlinks for the abs function in those products:
doc signal/abs doc simulink/abs
Run doc signal/abs to display the reference page for the abs function in the Signal Processing Toolbox product.
Run doc signal to display the roadmap page for Signal Processing Toolbox product.
Run doc serial.get to display the reference page for the get method located in the serial directory of MATLAB. This syntax is required because there is at least one other get function in MATLAB.
Run doc sads to display the help comments in the sads.m class definition file for the user-created sads class. Run doc sads.steer to go directly to help for the steer method of the user-created sads class. Run sads.Spacing to go directly to help for the Spacing property of the user-created sads class.
docopt, docsearch, help, helpbrowser, lookfor, type, web
Related topics in the MATLAB Desktop Tools and Development Environment documentation:
Assistance While Entering Statements, including function hints and the Function Browser
[1] UNIX is a registered trademark of The Open Group in the United States and other countries.
![]() | dmperm | docopt | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |