Extract the help information of all M functions in a sub-folder
Updated 8 Jul 2013

View License

extracthelp extracts the help lines of all M-files found int he current folder and writes them in corresponding files in a specified sub-folder.

The function is very useful in combination with the 'pcode'. The function pcode creates a pre-parsed P-files, that can be distributed to users who should not have access to the original code. However the P-files do not preserve the help information of the original functions. The 'extracthelp' function exports only the help information, thus allowing the users to use the 'help' function as usual.

extracthelp() % create the help M-files in a \phelp folder
pcode *.m % convert all .M files to .P files

The \phelp folder contains thus the files you can safely distribute.

Cite As

Andrey Popov (2024). extracthelp (https://www.mathworks.com/matlabcentral/fileexchange/21431-extracthelp), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Adding custom doc in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

- Bugfix;
- Updated help; Comments
- mkdir and movefile functions instead of "! md ..."

Updated author information and file finctions

Fixed bug by creating and accessing folders under Unix/Mac.

License changed from GPL to BDS inside the M file.

Added functionality.