matlab -nodesktop -nosplash
或者
matlab -nodisplay
或者
matlab -nojvm -nosplash
matlab -nodesktop -nosplash -r example
或者
matlab -nojvm -nosplash -r example
或者
matlab -nodisplay -r example
alias mrun='matlab -nodesktop -nosplash -r'
这样下次(或者执行source ~/.bashrc)之后就可以直接
mrun example
来在命令行运行matlab文件。
figure('visible','off');
并使用如下命令将图形输出到文件:
print('-deps','example.eps');
或者
hgsave('example.fig');
当你需要远程运行matlab时,这些命令非常有用。
评论