1.9: Built-in Function Documentation

Matlab and Octave Programming for STEM Applications · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC-SA 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    1.9: Built-in Function Documentation

    MATLAB comes with two forms of documentation, help and doc. The help command works in the Command Window; just enter help followed by the name of a command.

    >> help sin

    You should see output like this:

    sin    Sine of argument in radians. 
        sin(X) is the sine of the elements of X.
        
        See also asin, sind, sinpi.
    

    Some documentation uses vocabulary we haven’t covered yet. For example, the elements of X might not make sense until we get to vectors and matrices a few chapters from now.

    The doc pages are usually better. If you enter doc sin, a browser window appears with more detailed information about the function, including examples of how to use it. The examples often use vectors and matrices, so they may not make sense yet, but you can get a preview of what’s coming.


    This page titled 1.9: Built-in Function Documentation was last modified on Wed, 13 Jul 2022 23:29:47 GMT and is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Allen B. Downey (Green Tea Press) via source content that was edited to the style and standards of the LibreTexts platform.