FUNCTION REFERENCE
run
Run a script file.
Run a script file.
Syntax
run(name)Syntax
run('name.m')Syntax
run('folder/name.m')Runs the .mr or .m script name in your workspace, as typing name does.
When both name.mr and name.m exist, name.mr runs.
With a folder part (relative to the Current Folder, or absolute), the script
finds other files and saves and loads data in that folder while it runs;
afterwards the old folder is used again.
A function file runs with no inputs, as typing its name does.
Example
run('setup.m')Differences from MATLAB: at most 16 other folders per run, and scripts and
functions share a call depth of 32 (MATLAB allows 500).
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.