Skip to Main Content Skip to Search
Product Documentation

echodemo - Run scripted demo step-by-step in Command Window

Alternatives

As an alternative to the echodemo function, select the demo in the Help browser and click the Run in the Command Window link.

Syntax

echodemo filename
echodemo('filename', cellindex)

Description

echodemo filename runs the code file demo filename step-by-step in the Command Window. The demo filename.m must be a MATLAB language script, marked up with cells to enable it to pause after each step. At each step, click links in the Command Window to proceed. If the Command Window is not large enough to show the last link, scroll up to see it. You can create an HTML version of filename.m using the MATLAB cell publishing feature that you can display in the Help browser or a system browser. The link text in the Command Window also shows the current cell number, n, and the total number of cells, m, as n/m. When you click the link, filename opens in the Editor. To end the demo, click the Stop link.

echodemo('filename', cellindex) runs the code demo script filename, starting with the cell number specified by cellindex. Because steps prior to cellindex are not run, using this syntax to run demos can produce an error or unexpected result due to skipping code within the demo.

Tips

Examples

echodemo quake runs the MATLAB Loma Prieta Earthquake demo.

echodemo ('quake', 6) runs the MATLAB Loma Prieta Earthquake demo, starting at cell 6.

echodemo ('intro', 3) produces an error because cell 3 of the MATLAB demo intro requires data created when cells 1 and 2 run.

See Also

demo | doc | publish

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS