All variables defined in the parent workspace are accessible to the script and can be modified by the script. In this sense, all variables are considered global in a script. This feature is both handy and dangerous. You don't have to explicitly pass arguments to a script, but if you assign a value to a variable in a script that exists in the parent workspace, its value is overwritten. Wherever possible, use matrix operations rather than loops.
Functions can take variable numbers of arguments.
Save variables in a file Run external program which reads the file and writes output to another file. Load the data back in. You can, therefore, run a function, modify the mfile, and then run the new version. Modifying a mfile during the execution of the function does not affect the current process. Use the Matlab debugging commands to help track down programming errors.