ubuntu下matlab的无界面启动---命令行操作
命令行下运行 Matlab 及 函数
首先参考命令行下matlab的运行参数的定义与作用:http://www.cnblogs.com/beanocean/p/3677404.html
创建示例程序:test.m
- function test(x, y)
- fprintf(num2str(x+y))
- end
cmd下cd到test.m所在路径,输入如下命令:
- matlab -nojvm -nodesktop -nodisplay -r test
即可以简单界面形式启动matlab。查看任务管理器可发现此时的matlab耗用的内存要比完整的GUI版本小很多。
若有实现函数参数传入调用,则是如下形式:
- matlab -nojvm -nodesktop -nodisplay -r "test(2, 3)"

_________________________________________________________________________________________________________________________________________________
每一个不曾起舞的日子,都是对生命的辜负。
But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采
每一个不曾起舞的日子,都是对生命的辜负。
But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采

浙公网安备 33010602011771号