Publish dependent and called functions

Publish explicitly called functions not found in the MATLAB root. See mfile for limitations.
Updated 5 Feb 2013

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

publishdepfun creates a single published html file with called
functions attached to the end of the root mfile. Hyperlinks will be
within a "Called Functions" in the Table of Contents area of the
published document that link to the called function. Functions that are
called that are under MATLABROOT are not included in the published

publishdepfun only goes one level deep....

Example: If fun1 calls fun2, fun2 will be published. If fun2 calls fun3,
fun3 will not be published.

Calling: new_doc = publishdepfun(func,opts)


* func => character string of root function or script ('Function1').
The ".m" is not needed.
* opts => is the list of options for the publishing. See publish.m help
for more information.
* add_fun => is a cell array of additional functions to be published.
* rm_fun => is a cell array of functions to remove from publish list.


* new_doc => the final html document with attached subfunctions.
Name is the root file name with "_withfuncs" appended.

Cite As

Nick Angelini (2024). Publish dependent and called functions (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

added ability to add user list of functions that are not to be published

added ability to remove mex files from output

Added support for displaying published html document if no output variable is specified.

Added support for displaying published html document if no output variable is specified.

Changed title

Version 2
# added ability to pass additional functions as a cell array to be published.
# added '-calltree' opition to the depfun call to find the functions
passed into other functions like ode's and quad.