Programming Previous page   Next Page

Providing Help for Your Program

You can provide user information for the programs you write by including a help text section at the beginning of your M-file. (See Help Text).

You can also make help entries for an entire directory by creating a file with the special name Contents.m that resides in the directory. This file must contain only comment lines; that is, every line must begin with a percent sign. MATLAB displays the lines in a Contents.m file whenever you type

If a directory does not contain a Contents.m file, typing help directoryname displays the first help line (the H1 line) for each M-file in the directory.


Previous page  Creating a Simple M-File Creating P-Code Files Next page

© 1994-2005 The MathWorks, Inc.