Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

Using Demos and Code Examples

Overview of Demos and Code Examples

For an introduction to accessing and using demos and code examples, see:

Types of Demos

IconTypeDescriptionExample
M-file M-File demos:
  • Tell a story using source code, commentary, and output.

  • Are created by publishing an M-file script to HTML output using the Editor.

  • Can run without stopping, or cell-by-cell. A cell is a section of code that begins with two comment symbols (%%).

In the Help browser Contents pane, select MATLAB > Demos > Graphics > Square Wave from Sine Waves
M-GUI Standalone tool for exploring a feature.In the Help browser Contents pane, select MATLAB > Demos > Graphics > Vibrating Logo.
ModelSimulink block diagram.In the Help browser Contents pane, select Simulink > Demos > Automotive Applications > Engine Timing Simulation.
VideoVideo demos:
  • Are movies that highlights key features.

  • Plays in your system Web browser using the Adobe® Flash Player plug-in.

  • Could require an Internet connection.

In the Help browser Contents pane, select MATLAB > Demos > Getting Started > Importing Data from Files.

Ways to Access Demos

Ways to Run M-File Demos

To run an M-file demo from start to finish, see Running an M-File Demo.

To run an M-file demo section-by-section:

  1. On the demo page displayed in the Help browser, click Open filename in the Editor.

  2. In the Editor, select Cell > Evaluate Current Cell and Advance.

To run an M-file demo in the Command Window:

  1. Click Run in the Command Window.

  2. Scroll up in the Command Window to see the start of the instructions.

  3. Follow the instructions.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS