M-File Help: runscript | View code for runscript

# runscript

Run an M-file in interactive fashion

runscript(fname, options) runs the M-file fname and pauses after every executable line in the file until a key is pressed. Comment lines are shown without any delay between lines.

## Options

'delay', D | Don't wait for keypress, just delay of D seconds (default 0)
'cdelay', D | Pause of D seconds after each comment line (default 0)
'begin' | Start executing the file after the commnent line %%begin (default true)
'dock' | Cause the figures to be docked when created
'path', P | Look for the file FNAME in the folder P (default .)
'dock' | Dock figures within GUI

## Notes

- If not file extension is given in FNAME, .m is assumed.
- If the executable statement has comments immediately afterward (no blank lines) then the pause occurs after those comments are displayed.
- A simple '-' prompt indicates when the script is paused, hit enter.
- If the function cprintf() is in your path, the display is more colorful, you can get this file from MATLAB Central.

## See also

eval

© 1990-2014 Peter Corke.