Linux下c++调用自己编写的matlab函数:通过shell script system command实现

Scriptsvs. Functions

Program files can beScriptsthat simply execute a series of MATLAB statements,or they canbefunctionsthat also accept input arguments and produce output. Bothscripts and functions contain MATLAB code,andbothare stored in text files with a .m extension.However,functions are more flexible and more easily extensible.

说的很笼统,两者的区别就是调用方式不一样,function更灵活更容易扩展。其实传递参数不是function的专属,Script也可以接受传来的参数。下面举一个很简单的例子,更容易理解2者在使用中的区别。

在实际开发中,很多时候需要通过shellscript或者shellcommand来执行matlab函数(以c++为例,这种方法可以看作除了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值