MATLAB: Am I getting a qsub directive error when I run a script on the PBS scheduler

MATLAB

When I run a test script on the PBS scheduler, it returns the following error:
qsub: directive error

Best Answer

This may indicate a syntax error in the script that is being submitted.
For example, in the test script below, the error message "qsub: directive error: V" is caused by a missing dash (-) before the "V" option:
#PBS -N my_job
#PBS -l walltime=0:50:00
#PBS -o hostname.out
#PBS -e hostname.err
#PBS V
hostname
In the script above, the second to last line should be:
#PBS -V