Skip to content

Instantly share code, notes, and snippets.

@michaelchughes
Created May 1, 2016 19:54
Show Gist options
  • Save michaelchughes/5bb56d93c95e1e7618fc18b651e5d8c2 to your computer and use it in GitHub Desktop.
Save michaelchughes/5bb56d93c95e1e7618fc18b651e5d8c2 to your computer and use it in GitHub Desktop.
Simple demo script for launching Matlab programs on Brown CS grid
function [] = Countdown(start)
% Will just count down from provided input number to 1
% Printing each value along the way.
%
disp('Counting down...');
for i = start:-1:1
pause(0.5); % wait half a second
disp(i);
end
#!/bin/bash
# Run Countdown Matlab program in terminal (no GUI) on Brown CS filesystem
#
# Requires executable permissions (chmod +x Launcher.sh)
#
# Usage (to run locally)
# -----
# ./Launcher.sh
#
# Usage (on the grid)
# -----
# qsub -cwd -o stdout.txt -e stderr.txt -t 1 Launcher.sh
/local/bin/matlab -nosplash -nodisplay -nodesktop -r "Countdown(5); exit;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment