【发布时间】:2017-07-04 23:11:30
【问题描述】:
如果我在 matlab 文件 add.m 中定义 add(a,b) 函数,我如何从 c++ 代码中调用它?
一个简单的例子是这样的:
添加.m:
function y=add(a,b)
y=a+b;
end
c++代码:
int main(){
// call add(a,b) ?
}
实际上,我需要在我的 cpp 代码中使用更复杂的 matlab 函数,例如 cp2tform() 和 imtransform()。
【问题讨论】:
标签: c++ matlab function interactive