The tool "publish_all_functions" extends the capability of the publish command to publish the main function and its subfunctions together into one document html/pdf/...
- <function_name> - Name of the main function that has to be published.
- Use the same syntax format of "publish" command for <options>.
1. >> publish_all_functions(<function_name>,'pdf').
2. >> opts.outputDir = 'C:\';
>> opts.format = 'html';
Here are activities done by this utility.
- Reads all the subfunctions of "<function_name>".
- Creates a new file with the name "<function_name>", and copies the main function and the all the subfunctions into this.
- Lists all the "other files" pcodes, mex files and others that are called by <function_name>.m to the user.
- Publish the new file.
All files are placed in directory publish_files_<date>. If the directory already available, then it overwrites the contents.
Constraint: All functions should use either one of the closing command "return" or "end" uniformly between them. Else the function will stop the publishing process.
Demo: Please download the files.
Add the “demo_development_folder” into MATLAB path. Browse the contents in the folders. 'main_sample_function' is the main function for this development folder. Call the publishing tool as follows,
It will create a folder “publish_files_<today_date>” with the “html” subfolder. Refer the “html” subfolder for the published files.
Please share your comments and suggestions for any improvements.