Main Content

doc

Documentation in system web browser

Description

doc opens the documentation in a new tab in your system web browser. If your system web browser is open but not visible, then doc brings it to the foreground.

doc name displays documentation for the functionality specified by name, such as a function, class, or block.

  • If name corresponds to a MathWorks® reference page, then doc displays the page in your system web browser. The doc command does not display third-party or custom HTML documentation.

  • If name does not correspond to a reference page, then doc searches for help text in a file named name.m or name.mlx. If help text is available, doc displays it in your system web browser.

  • If name does not correspond to a reference page and there is no associated help text, then doc searches the documentation for name and displays the search results in your system web browser.

example

Examples

collapse all

Display the reference page for the abs function.

doc abs

Display the reference page for the handle class.

doc handle

Display the reference page for the findobj method in the handle class.

doc handle.findobj

Display the reference page for the Map class in the containers package.

doc containers.Map

Display formatted help text for a custom class.

The class file sads.m is an example file that shows how to create a class. Add the example folder to the path and request the documentation for sads.

addpath(...
   fullfile(matlabroot,'help','techdoc','matlab_env',...
   'examples'))
doc sads

Display the help for the steer method of the sads class. Because the help text follows MATLAB conventions, MATLAB formats the display in the browser.

doc sads.steer

Input Arguments

collapse all

Name of functionality, such as function, class, or block, specified as a character vector. Alternatively, an operator symbol.

Some classes and other packaged items require that you specify the package name. Events, properties, and some methods require that you specify the class name. Separate the components of the name with periods, such as:

doc className.name
doc packageName.name
doc packageName.className.name

Methods for some classes are not accessible using the doc command; instead, use links on the class reference page.

Tips

  • To access third-party or custom documentation, open your system web browser and navigate to the documentation home page. On the left side of the home page, click Supplemental Software. Then, click the name of the third-party or custom documentation that you want to access.

Version History

Introduced before R2006a

expand all