Desktop Tools and Development Environment |
Adding Your Own Demos
If you offer a toolbox or a collection of M-files to other users, you can include demo files and provide access to them from the MATLAB Help browser Demos tab.
Each product has a demos.xml
file that describes the available demos. MATLAB reads all of the XML-files that reside on the search path or in the current directory to build the Demos tab contents. To add your own demos, create a demos.xml
file for your toolbox, which includes pointers to your demo files. The term toolbox is used here for convenience, but the same concept applies to a blockset or any name you give to your M-file collection.
Follow these steps to add your own demos to the Help browser:
demos.xml
file in a directory that is on the search path or in the current directory.
matlab/help/techdoc/matlab_env/examples/mytoolboxdemos.xml
and save it as demos.xml
.
demos.xml
file.
<demos>
. The contents of this tag can include the <name>
, <type>
, <icon>
and <description>
tags, which describe the set of demos that you are adding.
Those tags may optionally be followed by <demosection>
tags, grouping your demos. Each demo section, in turn, will contain <demoitem>
tags that correspond to the individual demos.
Within one demos.xml
file, all <demoitem>
tags must either be children of the <demos>
tag directly, or must all be within <demosection>
tags. That is, you cannot have a demo item as a child of <demos>
followed by some demo sections. If you mix these two modes, the file will not load properly.
demo
in the Command Window or by selecting Start -> Demos.
demos.xml
file. Your demos should now appear in the Demos pane.
For additional examples, look at other demos.xml
files for MathWorks products. To list them, run
which -all demos.xml
Adding Your Own Help Files in the Help Browser | Preferences for the Editor/Debugger |
© 1994-2005 The MathWorks, Inc.