How do I pass variables to qsub a compiled Matlab script?

8 views (last 30 days)
Hi,
I have successfully compiled my matlab standalone file using mcc. It requires three variables to be passed to it, and I have tested it (also successfully) using ./My_Compiled_Script $var1 $var2 $var3.
Now I would like to submit this compiled script within a for loop that lists all .mat files with the data in them. The loop below works in that it submits jobs to my cluster queue - but the jobs are terminated quickly - with uninformative error messages. I've tried a few things like the lines commented within this loop below with no luck yet. Any help is much appreciated!!
for i in `ls *.mat`; do
# echo "./my_compiled_script $i $var2 $var3" | qsub -flags
# qsub -flags ./my_compiled_script $i $var2 $var3
# ./run_my_compiled_script.sh /matlab/directory $i $var2 $var3
done

Answers (0)

Categories

Find more on Platform and License in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!