Version (1.81 KB) by Anil
MAKECONTENTS(STRING) creates a standard "Contents.m"file in the current directory


Updated 7 Jul 2003

No License

Editor's Note: This functionality is now available in MATLAB. Please refer to the CONTENTSRPT.M function.

MAKECONTENTS(STRING) creates a standard 'Contents.m' file in the current directory by assembling the first comment (H1) line in each function found in the current working directory. If a 'Contents.m' file exists, it is renamed to 'Contents.old', before a new 'Contents.m' file is created. STRING is inserted as the first line of the 'Contents.m' file; if omitted, a blank line is inserted instead. The function changes permission on the resultant 'Contents.m' file to rw-r--r-- on Unix systems.

The MakeContents.m function is based on the mkcontnt.m function by Denis Gilbert. However, the present MakeContents.m function is fully compatible with the helpwin navigation function in Matlab.

This function was tested under Matlab Version (R11.1) on PCWIN and on UNIX platforms.

Cite As

Anil (2023). MakeContents (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R11.1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Search Path in Help Center and MATLAB Answers
Tags Add Tags

Inspired by: mkcontnt

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Modification provided by Matthew Brett, to accomodate making Contents.m recursively in sub-directories. Additional input arguments allow for variations on the format of the Contents.m.