MATLAB调用的API,C / C ++ [英] Call MATLAB APIs in C/C++

查看:164
本文介绍了MATLAB调用的API,C / C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从什么地方听说的数值计算,MATLAB确实提供了一些人性化的API。如果调用这些API在你的C / C ++ code,可以大大加快的计算。

I just heard from somewhere that for numerical computation, "MATLAB does offer some user-friendly APIs. If you call these APIs in your C/C++ code, you can speed up computation dramatically."

但我没有找到在MATLAB等文件资料如的http:/ /www.mathworks.com/support/tech-notes/1600/1622.html 并的http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/bp_kqh7.html.所有我从这些网站上了解到的是,MATLAB可以在C和C ++通过Matlab引擎或编译M文件到库中冶调用。他们不提任何内置的数值MATLAB的API,可以在C / C ++。

But I did not find such information in MATLAB documents like http://www.mathworks.com/support/tech-notes/1600/1622.html and http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/bp_kqh7.html. All I learned from these websites is that MATLAB can be called in C and C++ by Matlab engine or by compiling M-files into libraries by mcc. They don't mention any built-in numerical MATLAB APIs that can be called in C/C++.

有人可以请你澄清?

感谢和问候!

推荐答案

您想要的引擎程序。这使您可以从C启动一个后台进程MATLAB和执行就可以了算了一笔账:<一href=\"http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab%5Fexternal/f38569.html\"相对=nofollow>有关MATLAB文档。

You want the "Engine" routines. This allows you to start up a background MATLAB process from C and execute calculations on it: relevant MATLAB documentation.

它的工作原理pretty好了,看看例子。我会说,最讨厌的事让它工作在编组C和MATLAB之间的数据。但是,这总是在做这种事情时有问题。

It works pretty well, have a look at the examples. I would say the most annoying thing getting it working is marshaling the data between C and MATLAB. But that's always a problem when doing this kind of thing.

这篇关于MATLAB调用的API,C / C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆