Created
July 26, 2013 02:24
-
-
Save dbuscombe-usgs/6085573 to your computer and use it in GitHub Desktop.
Write and execute a Matlab script without opening Matlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filename=my_script.m; | |
cat > $filename << EOF | |
figure | |
plot(rand(1,10)) | |
print -dtiff test.tif | |
close | |
EOF | |
chmod +x $filename | |
/usr/local/MATLAB/R2011b/bin/matlab -nodesktop -nosplash -r "my_script;quit;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment