Skip to content

run

miscellaneous · scripts/miscellaneous/run.m

: run script
: run ("script")

Execute the script file script in the workspace of the caller, so that the variables it creates remain available.

The name may be given with or without the extension .m, as an absolute path, as a path relative to the current folder, or as the bare name of a script on the search path. While the script runs, the current folder is the folder that holds it; the previous current folder is restored afterwards, also when the script fails. Errors of the script are passed on to the caller.