Desktop Tools and Development Environment Previous page   Next Page

Contents Report

The Contents Report displays information about the integrity of the Contents.m file for the directory. A Contents.m file includes the filename and a brief description of each M-file in the directory. When you type help followed by the directory name, such as help mydemos, MATLAB displays the information in the mydemos/Contents.m file. For more information, see Providing Help for Your Program in the MATLAB Programming documentation.

If there is no Contents.m file for the directory and you run the Contents Report, the report tells you the Contents.m file does not exist and asks if you want to create one. Click yes to automatically create the Contents.m file. Edit the Contents.m file in the Editor/Debugger to include the names of files you plan to create, or to remove files that you do not want to expose when displaying help for the directory, such as files for internal use.

You need to update the Contents.m file to reflect changes you make to files in the directory. For example, when you remove a file from a directory, remove its entry from the Contents.m file. The Contents Report helps you to maintain the Contents.m file. It displays discrepancies between the Contents.m file and the M-files in the directory.

Image of Contents report.

Use the links displayed for each line, or edit the Contents.m file directly, or edit the M-files to make the changes. To make all of the suggested changes at once, click fix all. To automatically align the filenames and descriptions in the Contents.m file, click fix spacing.

If you always want the Contents.m file to reflect all files in the directory, you can automatically generate a new Contents.m file rather than changing the file based on the Contents Report. To do this, first delete the existing Contents.m file, run the Contents Report, and click yes when prompted for MATLAB to automatically create one.

Messages in the Contents File Report

No Contents File.   This message appears if there is no Contents.m file in the directory. Click yes to automatically create a Contents.m file, which contains the filenames and descriptions for all M-files in the directory.

No Contents.m file. Make one? [ yes ]

File Not Found.   This message appears when a file included in Contents.m is not in the directory. These messages are highlighted in pink. For example, a message such as

File helloworld does not appear in this directory.
Remove it from Contents.m? [ yes ] 

means the Contents.m file includes an entry for helloworld, but that file is not in the directory. This might be because you removed the file helloworld, or you manually added it to Contents.m because you planned to create the file but have not as yet, or you renamed helloworld.

Description Lines Do Not Match.   This message appears when the description line in the M-file help does not match the description provided for the M-file in Contents.m. These messages are highlighted in pink. Click yes to replace the description in the Contents.m file with the description from the M-file. Or select the option to replace the description line in the M-file help using the description for that file in Contents.m.

Description lines do not match for file logo5.
Use this description from the file? (default) [ yes ]
    logo5      - This is the basic logo image for MATLAB V5
Or put this description from the Contents into the file? [ yes ]
    logo5 - This is the basic logo image for MATLAB

Files Not In Contents.m.   This message appears when a file in the directory is not in Contents.m. These messages are highlighted in gray. Click yes to add the filename and its description line from the M-file help to the Contents.m file.

collatzall is in the directory but not Contents.m
    collatzall - Plot length of sequence for Collatz problem
Add the line shown above? [ yes ]

Previous page  Show Subfunctions Dependency Report Next page

© 1994-2005 The MathWorks, Inc.