Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

Getting Help

Ways to Get Help

To...Try ThisMore Information
Look for getting started guides, code examples, demos, and more.In the Help browser contents pane, expand the listing for a product.Browsing for Documentation and Demos
Find information about any topic.In the Help browser search field, type words you want to find in the documentation. Then press Enter.Searching for Documentation and Demos
Find a function and get help for it in a temporary window.

Select Help > Function Browser, then search or browse.

Finding Functions Using the Function Browser

Get syntax and function hints while using the Command Window and Editor.

Use colors and other cues to determine correct syntax.

While entering a function, pause after typing the left parenthesis. A summary of syntax options displays in a temporary window.

Assistance While Entering Statements

View help for a function or block.

Run doc name to display the reference page in the Help browser.

For quick help in the Command Window, run help name. Sometimes, the help text shows name in all uppercase letters to distinguish it. When you use name, do not use all uppercase letters.

doc reference page

help reference page
Get specific help while using a tool.Use the context-sensitive help, which some tools provide. Access the help using standard methods, such as Help buttons and context menus.See the documentation for a tool to learn about any special context-sensitive help available.
Check code for problems and get recommendations to maximize performance and maintainability.In the Editor, view M-Lint messages.Checking M-File Code for Problems Using the M-Lint Code Analyzer

Using the Help Browser to Access Documentation, Examples, and Demos

To open the Help browser, from any desktop tool, select Help > Product Help.

The Help browser shows Contents and Search Results in the left pane. When you select an item in the left pane, the right pane displays that page of documentation or that demo.

Use the Help browser to find and view documentation and demos for all installed MathWorks products. To use documentation and demos for only some of the installed products, see Filter by Product — Specifying Products Used in the Help Browser.

Types of Information in the Help Browser

IconTypeDescription
Getting Started guideIntroduction and overview of a topic. Intended for first time use or a quick reminder of basics.
User guideDetails and advanced topics about a tool or product.
Block reference page iconReference page for blockDetailed description of a block, and links to related topics.
Function reference page iconReference page for functionSyntax, description, short examples, and links to related topics.
Examples iconExamplesRunnable code examples and tutorials in the documentation.
Demos iconDemosRunnable code, models, and video demonstrations of product features.
Release NotesNew features, compatibility considerations, and bug reports for recent versions of products.

Searching for Documentation and Demos

  1. In the Help browser Search field, enter the words you want to find. Search finds pages containing all the words, unless you use any of the syntax options described in the following table.

    OptionSyntaxExample
    Exact phrase" " (quotation marks)"word1 word2"
    Wildcards in place of characters, for partial word searching*word*
    Some of the wordsORword1 OR word2
    Exclude wordsNOTword1 NOT word2

    For example, enter plot tool* label.

  2. Press Enter.

    Results appear in the Search Results pane. An icon indicates the type of result. See Types of Information in the Help Browser.

  3. Arrange results:

    • The default sort order is by relevance. Change the order by clicking the column header for Type or Product.

    • For results sorted by Type or Product, you can collapse and expand results for each type or product group. To expand or collapse all groups, right-click in the results pane, and select the option you want from the context menu.

    For example, to focus on introductory material, do the following. Click the Type column header. Right-click and select Collapse All. Then expand the Getting Started group.

  4. Select a result to view the page.

    • The Help browser highlights the search words on the page. To clear highlights, select Refresh from the Actions button .

    • To see where the page is within the documentation contents, use the navigation bar at the top of the page.

      Or click the Contents tab.

See also Getting Better Search Results.

Browsing for Documentation and Demos

You can find information by looking at a hierarchical view of documentation and demos.

  1. In the Help browser, click the Contents tab.

  2. View the types of information available for a product by expanding the product in the Contents listing. For example, expand MATLAB by clicking +.

  3. View available topics within a type by expanding the type for a product. For example, select MATLAB > Demos > Graphics.

    • Expand one topic by clicking +. Or select the topic and press the right arrow key.

    • Expand all topics within the selected topic by pressing the * key on the numeric keypad.

  4. To view an item in the display pane, select it. For example, select MATLAB > Demos > Graphics > Square Wave from Sine Waves.

Running Demos and Code in Examples

Review Workspace Before Running Demos and Code in Examples.   M-file demos and some code in examples run as scripts. Scripts store variables in the base workspace. There could be name conflicts if you have variables in the base workspace and the demo or code creates a variable with the same name. For example, the demo could overwrite your data. Compare the base workspace to a demo or code example before you run it, and address any name conflicts.

Running an M-File Demo.   For an M-file demo displayed in the Help browser:

  1. Click Open filename in Editor. For example, with the MATLAB > Demos > Graphics > Square from Sine Waves demo displayed, click Open xfourier.m in the Editor. xfourier.m is the name of the demo file.

  2. With the file open in the Editor, click Run .

The following figure illustrates the results of running the MATLAB > Demos > Graphics > Square Wave from Sine Waves demo.

Running Code That Is in Documentation or a Demo.   When the displayed documentation page or demo contains code, you can select some or all of the code and run it:

  1. Prepare variables the code uses, if necessary to run a selection of code.

  2. Select the code.

  3. Right-click and select Evaluate Selection.

To view the contents of a variable, right-click the variable and select Open Selection.

Code in the documentation includes small fragments, as well as complete executable example files. The documentation example files are in matlabroot/help/.../examples for each product. The files in examples are not on the search path. When the documentation instructs you to run an example file, first make the file accessible to MATLAB in one of these ways:

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS