Getting Started with MATLAB | Search  Help Desk |
Help and Online Documentation
There are several different ways to access online information about MATLAB functions.help
command
help
command is the most basic way to determine the syntax and behavior of a particular function. Information is displayed directly in the command window. For example
help magicprints
MAGIC Magic square. MAGIC(N) is an N-by-N matrix constructed from the integers 1 through N^2 with equal row, column, and diagonal sums. Produces valid magic squares for N = 1,3,4,5....NOTE
help
entries use uppercase characters for the function and variable names to make them stand out from the rest of the text. When typing function names, however, always use the corresponding lowercase characters because MATLAB is case sensitive and all function names are actually in lowercase.
All the MATLAB functions are organized into logical groups, and MATLAB's directory structure is based on this grouping. For example, all the linear algebra functions reside in the matfun
directory. To list the names of all the functions in that directory, with a brief description of each:
help matfun Matrix functions - numerical linear algebra. Matrix analysis. norm - Matrix or vector norm. normest - Estimate the matrix 2-norm ...The command
helpby itself lists all the directories, with a description of the function category each represents:
matlab/general matlab/ops ...The MATLAB help window is available on PCs and Macs by selecting the Help Window option under the Help menu, or by clicking the question mark on the menu bar. It is also available on all computers by typing
helpwinTo use the help window on a particular topic, type
helpwin topicThe help window gives you access to the same information as the
help
command, but the window interface provides convenient links to other topics.
The lookfor
command allows you to search for functions based on a keyword. It searches through the first line of help
text, which is known as the H1 line, for each MATLAB function, and returns the H1 lines containing a specified keyword. For example, MATLAB does not have a function named inverse
. So the response from
help inverseis
inverse.m not found.But
lookfor inversefinds over a dozen matches. Depending on which toolboxes you have installed, you will find entries like
INVHILB Inverse Hilbert matrix. ACOSH Inverse hyperbolic cosine. ERFINV Inverse of the error function. INV Matrix inverse. PINV Pseudoinverse. IFFT Inverse discrete Fourier transform. IFFT2 Two-dimensional inverse discrete Fourier transform. ICCEPS Inverse complex cepstrum. IDCT Inverse discrete cosine transform.Adding
-all
to the lookfor
command, as in
lookfor -allsearches the entire help entry, not just the H1 line. The MATLAB Help Desk provides access to a wide range of help and reference information stored on a disk or CD-ROM in your local system. Many of the underlying documents use HyperText Markup Language (HTML) and are accessed with an Internet Web browser such as Netscape or Microsoft Explorer. The Help Desk process can be started on PCs and Macs by selecting the Help Desk option under the Help menu, or, on all computers, by typing
helpdeskAll of MATLAB's operators and functions have online reference pages in HTML format, which you can reach from the Help Desk. These pages provide more details and examples than the basic
help
entries. HTML versions of other documents, including this manual, are also available. A search engine, running on your own machine, can query all the online reference material.
If you know the name of a specific function, you can view its reference page directly. For example, to get the reference page for the eval function, type
doc evalThe
doc
command starts your Web browser, if it is not already running.
Printing Online Reference Pages
Versions of the online reference pages, as well as the rest of the MATLAB documentation set, are also available in Portable Document Format (PDF) through the Help Desk. These pages are processed by Adobe's Acrobat reader. They reproduce the look and feel of the printed page, complete with fonts, graphics, formatting, and images. This is the best way to get printed copies of reference material. If your computer is connected to the Internet, the Help Desk provides a connection to The MathWorks, the home of MATLAB. You can use electronic mail to ask questions, make suggestions, and report possible bugs. You can also use the Solution Search Engine at The MathWorks Web site to query an up-to-date data base of technical support information.