I believe it is not reading your variables because you are not putting a $
in front of them. You srun line should be:
srun --exclusive --cpus-per-task=12 matlab2013b/bin/matlab -nodesktop -nosplash -nodisplay -r "RUNAGT(${SLURM_ARRAY_TASK_ID},${VAR1},${VAR2});exit" -logfile testV${SLURM_ARRAY_TASK_ID}.log &