slurm example for a simple executable file
<p>I am a a freshman to programming in SLURM. Is there any possibility to execute MATLAB code using sbatch. </p>

<p>(I tried using MATLAB as a executable for getting some error /usr/local/MATLAB/R2012a/bin/matlab: 1: /usr/local/MATLAB/R2012a/bin/util/oscheck.sh: /lib64/libc.so.6: not found)</p>

<p>The MATLAB code plots contours for the files dumped by a C code into the working directory.</p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;library&gt;
FILE *first_file;
main()
{
MatrixXd A = Eigen::MatrixXd::Random(10, 10);
    first_file = fopen("first_file.dat","w");
for (int i=0;i&lt;10;i++) 
    fprintf(first_file," %lf \t",A.data(i));
}
</code></pre>

<p>I compiled the code using gcc file.c -o file
and later called by matlab using system('file') command.</p>