#!/bin/csh # Script name: mbatch # This shell script demonstrates the procedure to launch matlab to run script # and function m-file (space between double quotes is the matlab environment) # Two ways to use this script: # scc1:~ % qsub mbatch (run in batch) # To run on screen, mbatch needs execute attribute # scc1:~ % chmod u+x mbatch (need be done only once) # scc1:~ % mbatch (run on screen) matlab -nodisplay -singleCompThread -r "n=4, testScript; testFunc(n); exit" ~ ~ ~ ~ ~ ~ ~ ~ ~