Run script in the current workspace.
Scripts which reside in directories specified in Octave’s load path, and
which end with the extension ".m", can be run simply by typing
their name. For scripts not located on the load path, use run
.
The filename script can be a bare, fully qualified, or relative filename and with or without a file extension. If no extension is specified, Octave will first search for a script with the ".m" extension before falling back to the script name without an extension.
Implementation Note: If script includes a path component, then
run
first changes the working directory to the directory where
script is found. Next, the script is executed. Finally, run
returns to the original working directory unless script
has
specifically changed directories.
See also: path, addpath, source.
Package: octave