在Matlab中调用外部的exe文件,并将Workspace 中的变量作为参数传递给exe文件

How do I pass arguments into and out of my standalone executable?

http://www.mathworks.cn/support/solutions/en/data/1-18448/index.html?solution=1-18448


Generally, the idea of a standalone executable is to simply run it without inputs or outputs.

Input arguments are passed to a standalone application created using MATLAB Compiler in the same way that input arguments are passed to any console based application. The following are example commands to execute an application called "filename" from a DOS or UNIX command prompt with different types of input arguments.


If you wish to pass the contents of a MATLAB variable to the program as an input, the variable must be converted to a string. For example:
for k=1:10
cmd = ['filename ',num2str(k)];
system(cmd);
end

如果我的输入参数是两个矩阵的话, 还是挺麻烦的。 2011b后好像不支持将m文件转换成mex,这样就可以像调用m文件一样方便了。


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值