help - Help for functions in Command Window - MATLAB (original) (raw)

Main Content

Help for functions in Command Window

Syntax

Description

help [name](#d126e736650) displays the help text for the functionality specified by name, such as a function, method, class, toolbox, variable, or namespace.

example

help displays content relevant to your previous actions.

Examples

collapse all

Display Function and Overloaded Method Help

Display help for the MATLAB® delete function.

delete - Delete files or objects This MATLAB function deletes filename from disk, without requesting verification.

Syntax
  **delete** filename
  **delete** filename1 ... filenameN
  **delete** ___ ResolveSymbolicLinks=tf
  **delete**(obj)**delete** Delete file or graphics object.

...

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.

handle/delete - Delete handle object This MATLAB function deletes the handle object.

Syntax
  **delete**(H)

...

Display Namespace, Class, and Method Help

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

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

Not all namespaces, classes, and associated methods or events require complete specification. For example, display the help text for thethrowAsCaller method of theMException class.

Display Variable Help

Display help for a variable of type datetime. Because t is of type datetime, thehelp command displays help text for thedatetime class.

--- help for datetime ---

datetime - Arrays that represent points in time The datetime data type represents points in time, such as August 24, 2020, 10:50:30 a.m.

Creation

...

Request help for Day, a method of thedatetime class.

--- help for datetime/Day ---

datetime/Day - Day-of-month number numeric array ...

Display Help for Functions in Folder

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

Timing functions. cputime - CPU time in seconds. tic - Start stopwatch timer. toc - Stop stopwatch timer. etime - Elapsed time. pause - Wait in seconds. ...

Input Arguments

collapse all

name — Functionality name

character vector | string scalar

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 themethodname method of the classname class, type help classname.methodname.

Some classes and other namespace items require that you specify the namespace 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, typeclassname.propertyname. To get help for theclassname class in thenamespacename namespace, typenamespacename.methodname. To get help for themethodname method of the classname class in the namespacename namespace, typenamespacename.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:

Tips

Alternative Functionality

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

Version History

Introduced before R2006a