MATLAB Function Reference Previous page   Next Page
run

Run script that is not on current path

Syntax

Description

run scriptname runs the MATLAB script specified by scriptname. If scriptname contains the full pathname to the script file, then run changes the current directory to be the one in which the script file resides, executes the script, and sets the current directory back to what it was. The script is run within the caller's workspace.

run is a convenience function that runs scripts that are not currently on the path. Typically, you just type the name of a script at the MATLAB prompt to execute it. This works when the script is on your path. Use the cd or addpath function to make a script executable by entering the script name alone.

See Also

cd, addpath


Previous page  rsf2csf save Next page

© 1994-2005 The MathWorks, Inc.