Skip to content

run

Execute a script file by path.

run(scriptfilename)

Runs the script at the given path, even when its containing directory isn’t on the search path. Equivalent to cd’ing to the script’s directory, executing the script, and returning.

run('scripts/setup.m')
  • eval — Execute a string as MathJet code.
  • exist — Check whether a name exists in the workspace, on disk, or as a built-in.