Package a
Toolbox
Dialog Box
Section
Description
Examples,
Apps, and
Document
ation
Examples—Published MATLAB examples associated with your
toolbox. To include .m and .mlx files as examples, click the Add
examples button, select your code file, and click Publish HTML.
MATLAB publishes the code to HTML and places the output files in
the html folder.
Alternatively, you can manually publish code files to HTML in
MATLAB and then include the code files and the HTML files in your
toolbox folder.
- For a live script (.mlx) example, export it to HTML. On the Live
Editor tab, select Save > Export to HTML and save it in a
folder named html. - For a script (.m) example, publish it to HTML with the publish
function. Do not specify an output folder when publishing your
examples. For the Package a Toolbox tool to recognize the
examples, the output folder must be the default folder (html).
To create different categories for your examples, place the
examples in different subfolders within your toolbox folder. When
you add your toolbox folder to the Package a Toolbox dialog box,
MATLAB creates a demos.xml file to describe your examples, and
takes the example subfolder name as the example category name.
Alternatively, you can create your own demos.xml file. The
demos.xml file allows recipients to access your examples through
the Supplemental Software link at the bottom of the Help
browser home page. For more information, see “Display Custom
Examples” on page 30-37.
25 Programming Utilities