Running Matlab Jobs in Batch Mode
General Instructions for Running a Matlab Job in Batch Mode in Windows.
- General instructions are provided on the Matlab support web site at http://www.mathworks.com/support/solutions/data/8965.shtml.
Example: Running a Matlab job in batch mode on a CRADC node.
- Use the Matlab M-file editor (or
other text editor) to create your ".m" file:
- Be sure that the filename extension is .m.
- Be sure to include the command "exit" as the last command in the file.
- Open a command window
on the CISER computing node desktop:
- From Windows go to Start --> Run --> and type in "Command" --> OK.
- OR go to Start --> All Programs --> Accessories --> Command Prompt.
- In the command window
change to the directory which contains your ".m" file:
- First change to the drive by typing the drive letter at the prompt (e.g. R:, L:, or U:) and then press "enter".
- Then change directories
to the folder you wish to use:
- examples:
- cd projfold\myfold\
- cd projfold\myfolder\mymfiles
- examples:
- Run the matlab
job from the command line as follows:
- type at
the prompt:
- matlab -nosplash -r [a,b,c]=myarray -logfile myarray.log
- Where "myarray" refers to the .m file ("myarray.m") in the current working directory, and "myarray.log" is the log file that will contain the output that would usually be generated in the Matlab window if run in interactive mode.
- type at
the prompt: