Skip to content. | Skip to navigation

Personal tools
    di Bernardo Lab - Systems and Synthetic Biology Lab
    You are here: Home Internal Site DRY LAB MATLAB STUFF Using MATLAB without compiler and qsub

    Using MATLAB without compiler and qsub

    Hi all matlab users, In my lab here, people are running MATLAB using qsub without compiling it. Its a nice way to run it. Attached is the way to do it.

    __________MATLAB CODE ________

    $ cat matlab.plot-test.m

    t = 0:.3:10;

    y = sin(t);

    plot(t,y)

    print -dpng matlab.plot-test.png;

    quit;

    __________________________________

    Remember to include a "quit" instruction at the end of the file containing MATLAB commands (that is, in the M-file)!!

    'Sun Grid Engine submit file:

    $ cat matlab.sge.submit.scr

    1. !/bin/sh

    1. $ -S /bin/sh

    1. $ -cwd

    1. $ -j y

    1. $ -o matlab.plot-test.out

    if ! echo $PATH | /bin/grep -q /nfs/apollo/1/shares/software/core_facility/local/matlab/2007b/bin; then export PATH=$PATH: /nfs/apollo/1/shares/software/core_facility/local/matlab/2007b/bin fi

    matlab -nodisplay -nojvm < ./matlab.plot-test.m

    printf '\n%s\n' "MATLAB plot test run complete"

    _______

    Submit run:

    qsub matlab.sge-submit.scr

    Mukesh