Create and Share MATLAB Examples

MATLAB examples are highly-readable MATLAB code files that show you how to solve particular programming problems. All MATLAB toolboxes include examples.  You can create your own MATLAB examples and share them with others in the MATLAB community. MATLAB examples include marked-up explanatory text describing individual steps, from which you can automatically generate publication-quality documents with numerical and graphical output.

Learn the basics:

Share Your Examples on the MATLAB File Exchange

To share your examples with the rest of the community:

  1. Create your MATLAB example script.
  2. Publish the script as HTML for viewing in a web browser.
  3. Submit the MATLAB script, any supporting files, and the HTML directory created by the publish command to File Exchange.  File Exchange automatically tags the submission as an example.