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

#!/bin/bash

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

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

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