| Contents | Index |
As an alternative to the echodemo function, select the demo in the Help browser and click the Run in the Command Window link.
echodemo filename
echodemo('filename', cellindex)
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.
Only use echodemo to display scripts, not functions. echodemo can run any script that you can execute, but only scripts with code cells pause between steps.
If variables in your base workspace have the same name as variables that a demo creates, the demo could overwrite your data. Preserve your data by saving it to a MAT-file before running the demo.
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.

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |