matlab echodemo函数语法

发表matlab echodemo函数相关文章
一句话说明: Run example script step-by-step in Command Window


Run example script step-by-step in Command Window




echodemo filename runs the script specified by filename step-by-step in the Command Window. The file must contain sections defined with two percent signs (%%) to enable pausing after each step. At each step, you can click links in the Command Window to proceed or stop. If the Command Window is not large enough to show the links, scroll up to see them.

    Caution   If variables in your base workspace have the same name as variables that the example file creates, the example could overwrite your data. Preserve your data by saving it to a MAT-file before running the example.


echodemo(filename,index) starts with the section number specified by index. If the example relies on results of previous steps, using this syntax can produce errors or unexpected results.


Run Example Script in Command Window

Run the Loma Prieta Earthquake example.

echodemo quake

Start Script from Specified Section

Start the Loma Prieta Earthquake example from the third section.

filename = 'quake';
index = 3;

This code errors because the example requires variables created in earlier sections.

Input Arguments

filename — Script file namestring

Script file name, specified as a string.

When you use the function syntax for echodemo and specify its inputs within parentheses, enclose the filename input in single quotes.

index — Section indexscalar integer

Section index, specified as a scalar integer.

The link text in the Command Window shows the current section number, n, and the total number of sections, m, as n/m.

More About


  • Only use echodemo to display scripts, not functions. echodemo can run any script that you can execute, but only scripts with sections pause between steps.

See Also

| |


与matlab echodemo用法相关的文章

友情链接It题库(| 版权归yishouce.com所有| 友链等可联系|粤ICP备16001685号-1