start matlab script from linux command line
Posted by rolf on Tuesday, 27 January 2015
If you want to start a matlab script from terminal (in linux or mac), you can use following command
matlab -nojvm -nodisplay -nosplash -r "addpath ('/path/to/script'), test_script(imgSize,'savepath'), exit"
Then matlab starts, executes the script and exits again.
test_script looks something like
function test_script(j,savepath)
img = rand(imgSize,imgSize);
imwrite(img, sprintf('%s/myTestImg.png',savepath),'png');
return
blog_external_links:
Add new comment