Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

run - Run script that is not on current path

Syntax

run scriptname

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 folder to be the one in which the script file resides, executes the script, and sets the current folder 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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS