#!/bin/bash
while read MC M c_h N bw
do
    JOB=`qsub -m abe -N SZ - << EOJ

#!/bin/bash

#PBS -j oe
#PBS -l cput=55:00:00
#PBS -l mem=8gb

cd ~/matlabprog
matlab > "SZ_sim_${MC}_${M}_${c_h}_${N}_${bw}.log" << M_PROG
SZ_sim(${MC},${M},${c_h},${N},${bw});
M_PROG
EOJ
`

echo "JobID = ${JOB} for parameters ${MC} ${M} ${c_h} ${N} ${bw} submitted on `date`"
done < SZ_par.txt
exit