next up previous contents
Next: Function Files Up: M-files Previous: M-files

Script and Data Files

A script is a list of commands that you might give to MATLAB directly. Typing script in MATLAB will execute, in order, the commands in the script.m file. As usual, the result of each will be printed out unless it ends with a semicolon; putting a semicolon at the end of the script invocation will not suppress these results.

To see the commands themselves as well as their results, use echo on and echo off.

Variables in a script file are automatically global; that is, if there is a variable of the same name in the workplace, it is what will be used and/or changed by the script.

Sat Mar 21 21:42:28 EST 1998