6/19/2023 0 Comments Matlab help line![]() ![]() ![]() You can check what directories are in your PATH with $ echo $PATH The /usr/local/ directory is for user installed scripts as opposed to system installed scripts. I recommend you place your matlab bash script in /usr/local/bin and ensure that /usr/local/bin is in your PATH. Applications/MATLAB_R2015b.app/bin/matlab wildcard passes all of the parameters you use, like -nodesktop -nosplash -r "foo" to the matlab executable so what is actually called now is $ /Applications/MATLAB_R2015b.app/bin/matlab -nodesktop -nosplash -r "foo" Given that you have already written a bash script to call matlab the easiest solution is to alter it to include the bash wildcard like #!/bin/bash Alternatively you could call the full path to matlab like $ /Applications/MATLAB_R2015b.app/bin/matlab -nodesktop -nosplash -r "foo" There are several ways you can fix this whilst retaining the ease of just calling matlab. What is actually called is $ /Applications/MATLAB_R2015b.app/bin/matlab When you type $ matlab -nodesktop -nosplash -r "foo" Your bash script for calling Matlab will not pass any arguments to the Matlab executable. Applications/MATLAB_R2015b.app/bin/matlab If it helps, this is how I have matlab coded in my bin: #!/bin/bash And command line won't do anything until I close out the window. Pretty much every time I try it, I keep getting the same response (when the line just doesn't cause the prompt to say "screw you" and give up): the actual MATLAB program window will open, and it will stay open. Matlab -nojvm -nodesktop -nosplash -r foo ![]() Matlab -nojvm -nosplash -nodisplay -r "foo quit " Matlab -nojvm -nosplash -nodisplay -r foo quit I have found several of the previous answers on this question, and so I have tried: matlab -nodisplay -r foo This program both displays graphs and writes a text file for me to use. I have been trying to call matlab from Terminal (I have a Mac) and have it simply run a program for me, without display or anything, just the program. ![]()
0 Comments
Leave a Reply. |