MATLAB's help
Where can you turn for help with specific MATLAB commands that are not described
explicitly in the textbook? The book by Hanselman & Littlefield entitled,
Mastering MATLAB 7 is a useful resource, but there is also extensive online
documentation to turn to for help. In the Command Window, the help command
can be used to find information about specific commands whose name you know. For
example, suppose you want to know more about the cos (cosine) function:
>> help cos
COS Cosine.
COS(X) is the cosine of the elements of X.
See also acos, cosd.
Overloaded functions or methods (ones with the same name in other
directories)
help sym/cos.m
Reference page in Help browser
doc cos
OK, so this doesn't do much for you, but the doc cos at the end is a helpful
pointer. Enter this command in the Command Window:
>> doc cos
and a separate Help window will appear with more extensive information, including a more
complete description of the cos function and an example of a cosine plot.
The Help window can be opened at any time by selecting the MATLAB Help
entry from the Help menu at the top of the main MATLAB window, or by pressing the
F1 key on your keyboard. In the panel on the left side of the Help window, there
are four overlaid window panes that can be selected using the tabs at the top of
the windows:
(a) The Contents window
The Contents window is an expandable Table of Contents of the documentation pages.
Click on the + and - boxes to the left of each entry to view the contents in more or less
detail. Click on a particular text entry to bring up that documentation page in the window on the
right. Open the following sequence of sections:
MATLAB
Graphics
Basic Plotting Commands
Select and peruse some of the specific documentation pages listed under
Basic Plotting Commands , such as Plotting Steps,
Creating Line Plots, etc. There is much more information here than you need
at this point,
but it's good to know where to look when you need help with plotting.
(b) The Index window
This window provides an alphabetized list of MATLAB functions and concepts. You can
jump to the selections for a particular letter by clicking on the letter at the top
of this window.
(c) The Search window
You can also search for a particular command or keyword(s) through the
Search window. Suppose you want to know how to set the range of values
that are plotted on the axes of a graph. Try entering the following text in the text
box at the top of this window, and click on Go :
setting axis range
Information about the axis function, which can be used for this
purpose, appears in the window on the right.
(d) The Demos window
This is definitely the most fun window! There's an expandable list of contents
similar to the Contents window. Open the MATLAB entry, and
then the Graphics entry. You can then select a demo from
either the list in the left window or the table in the right window. Try out some
of the demos and let us know which ones you like the best!
Note: You do not need to submit anything for this exercise.
|