This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

help

Help for functions in Command Window

Syntax

help name
help

Description

example

help name displays the help text for the functionality specified by name, such as a function, method, class, toolbox, or variable.

Note

Some help text displays the names of functions in uppercase characters to make them stand out from the rest of the text. When typing these function names, use lowercase. For function names that appear in mixed case (such as javaObject), type the names as shown.

help displays content relevant to your previous actions.

Examples

collapse all

Display help for the MATLAB® delete function.

help delete
delete Delete file or graphics object.
    delete file_name  deletes the named file from disk.  Wildcards
    may be used.  For example, delete *.p deletes all P-files from the
    current directory.
...

Because delete is the name of a function and of several methods, the help text includes a link to a list of the methods with the same name.

Request help for the delete method of the handle class.

help handle/delete

Display help for the containers package, the Map class, and the isKey method.

help containers
help containers.Map
help containers.Map.isKey

Not all packages, classes, and associated methods or events require complete specification. For example, display the help text for the throwAsCaller method of the MException class.

help throwAsCaller

Display help for a variable of type datetime.

t = datetime
help t

Because t is of type datetime, the help command displays help text for the datetime class.

Request help for Day, a method of the datetime class.

help t.Day

List all of the functions in the folder matlabroot/toolbox/matlab/timefun by specifying a partial path.

help timefun

Input Arguments

collapse all

Functionality name, such as the name of a function, method, class, toolbox, or variable, specified as a character vector or string scalar. name also can be an operator symbol (such as +).

If name is a variable, help displays the help text for the class of that variable.

To get help for a method of a class, specify the class name and the method name, separated with a period. For example, to get help for the methodname method of the classname class, type help classname.methodname.

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. For example, to get help for the propertyname property of the classname class, type classname.propertyname. To get help for the classname class in the packagename package, type packagename.methodname. To get help for the methodname method of the classname class in the packagename package, type packagename.classname.methodname.

If name appears in multiple folders on the MATLAB search path, help displays the help text for the first instance of name found on the search path.

If name is overloaded, help displays a link to a list of the methods with the same name.

If name specifies the name or partial path of a folder:

  • If the folder contains a nonempty Contents.m file, the help function displays the file. Contents.m contains a list of MATLAB program files in the folder and their descriptions.

  • If the folder contains an empty Contents.m file, the help function displays name is a folder.

  • If the folder does not contain a Contents.m file, the help function lists the first line of help text for each program file in the folder.

  • If name is the name of both a folder and a function, the help function displays the associated text for both the folder and the function.

Tips

  • To prevent long descriptions from scrolling off the screen before you have time to read them, enter more on, and then enter the help statement.

  • To identify the package name for a class, create an instance of the class, and then call class(obj).

Alternative Functionality

View more extensive help using the doc command or the Function Browser.

Introduced before R2006a