Sunday, February 10, 2013

Run matlab program from shell

This is nice!
#!/bin/bash filename=program.m; cat > $filename << EOF % It is matlab script disp('Hello World') A=zeros(3,3); if size(A)==3 disp('Hello again') end EOF chmod +x $filename matlab -nodesktop -nosplash -nodisplay -r "run ./$filename ; quit;"
-->

No comments: