Publish dependent and called functions

Publish explicitly called functions not found in the MATLAB root. See mfile for limitations.
4.4K Downloads
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
output.

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)

Inputs:

* 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.

Outputs:

* 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 (https://www.mathworks.com/matlabcentral/fileexchange/33476-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
1.6.0.0

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

1.5.0.0

added ability to remove mex files from output

1.4.0.0

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

1.3.0.0

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

1.2.0.0

Changed title

1.1.0.0

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.

1.0.0.0