| Contents | Index |
| On this page… |
|---|
Help on Functions from the Help Browser Help on Functions from the Command Window |
Open the Help browser from the MATLAB Command Window using one of the following:
Click the question mark symbol in the toolbar.
Select Help > Product Help from the menu.
Type the word doc at the command prompt.
For more information: See Ways to Get Function Help.
You can find help on a MATLAB function in any of the following ways:
Click the
button in the left pane
of the Help browser. This brings you to that part of the Function
Reference documentation that is organized by category. To use an alphabetical
list to get help on a specific function, click Alphabetical List at
the top of that page.
Click the
button in the left pane
of the Help browser. Look in the upper left corner of the page for
links to either Functions: By Category, or Functions: Alphabetical
List and click there for the type of documentation access you prefer.
Type doc functionname at the command line.
Several types of help on functions are available from the Command Window:
To list all categories that you can request help on from the Command Window, just type
help
To see a list of functions for one of these categories, along with a brief description of each function, type help category. For example,
help datafun
To get help on a particular function, type help functionname. For example,
help sortrows
In addition to the help on individual functions, you can get help on any of the following topics by typing help topicname at the command line.
Topic Name | Description |
|---|---|
arith | Arithmetic operators |
relop | Relational and logical operators |
punct | Special character operators |
slash | Arithmetic division operators |
paren | Parentheses, braces, and bracket operators |
precedence | Operator precedence |
datatypes | MATLAB classes, their associated functions, and operators that you can overload |
lists | Comma separated lists |
strings | Character strings |
function_handle | Function handles and the @ operator |
debug | Debugging functions |
java | Using Sun Java from within the MATLAB software. |
changeNotification | Microsoft Windows change notification |
Before displaying a lengthy section of help text or code, put MATLAB into its paged output mode by typing more on. This breaks up any ensuing display into pages for easier viewing. Turn off paged output with more off.
Page through the displayed text using the space bar key. Or step through line by line using Enter or Return. Discontinue the display by pressing the Q key or Ctrl+C.
Start each program you write with a section of text providing help on how and when to use the function. If formatted properly, the MATLAB help function displays this text when you enter
help functionname
MATLAB considers the first group of consecutive lines immediately following the function definition line that begin with % to be the help section for the function. The first line without % as the left-most character ends the help.
For more information: See Help Text.
You can write help for subfunctions using the same rules that apply to main functions. To display the help for the subfunction mysubfun in file myfun.m, type
help myfun>mysubfun
To display the help for a private function, precede the function name with private/. To get help on private function myprivfun, type
help private/myprivfun
You can write help text for object-oriented class methods implemented as MATLAB functions. Display help for the method by typing
help classname/methodname
where the file methodname.m resides in subfolder @classname.
For example, if you write a plot method for a class named polynom, (where the plot method is defined in the file @polynom/plot.m), you can display this help by typing
help polynom/plot
You can get help on overloaded MATLAB functions in the same way. To display the help text for the eq function as implemented in matlab/iofun/@serial, type
help serial/eq
![]() | Command and Function Syntax | Development Environment | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A; sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |