MATLAB: Is it possible to include package and class directories in Contents Report created programmatically in MATLAB 7.11 (R2010b)

contents.mdirectoriesMATLAB

I need to generate a contents report that also includes all the subdirectories, including package and class directories, within the directory passed.
I observe that the CONTENTSRPT function does not list subdirectories, package or class folders.

Best Answer

This functionality is currently not available in MATLAB. As a workaround, the attached function FINDSUBDIR accepts the directory path as an input string and lists of all MATLAB files within the directory, including directories marked with @ (class folders) and with + (package folders) in the MATLAB Command Prompt.
The syntax used to call the function is as follows:
findSubdir(cd, 'Recurse', true);