This is an old revision of the document!
You may need to run Matlab scripts in a qsub job. It's fairly easy. This command will run a series of Matlab commands from the command line (shell), which we can use in a qsub job script:
matlab -nodisplay -r "a=[1 2 3]; disp(a); disp(a+1); exit"
Explanation:
So if you put the above text in a file called matlabjob
and run:
qsub matlabjob
you'll get the following output in your matlabjob.o<jobid> file (where <jobid> will be the job id of your run of qsub):
< M A T L A B (R) > Copyright 1984-2013 The MathWorks, Inc. R2013a (8.1.0.604) 64-bit (glnxa64) February 15, 2013 To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com. 1 2 3 2 3 4