Matlab and Octave Programming for STEM Applications · LibreTexts
0%
Contents
Text
Size
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
Opening the book…
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.