命令行下运行 Matlab 及 函数

 

首先参考命令行下matlab的运行参数的定义与作用:http://www.cnblogs.com/beanocean/p/3677404.html

创建示例程序:test.m

 

[plain] view plain copy
  1. function test(x, y)  
  2.     fprintf(num2str(x+y))  
  3. end  

cmd下cd到test.m所在路径,输入如下命令:

[plain] view plain copy
  1. matlab -nojvm -nodesktop -nodisplay -r test  


即可以简单界面形式启动matlab。查看任务管理器可发现此时的matlab耗用的内存要比完整的GUI版本小很多。

若有实现函数参数传入调用,则是如下形式:

 

[plain] view plain copy
  1. matlab -nojvm -nodesktop -nodisplay -r "test(2, 3)"  


ubuntu下matlab的无界面启动---命令行操作

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2022-01-16
猜你喜欢
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案