C++ matlab 引擎 c++回调函数

发布于 2024-12-20 06:30:26 字数 98 浏览 4 评论 0原文

我正在编写一个应用程序,需要由 matlab 引擎完成一些操作。然而,在 matlab 脚本中我需要一些回调函数。是否可以在 matlab 脚本中创建返回到 C++ 函数的回调函数?

I'm writing an application which need to have some things done by the matlab engine. However, inside the matlab scripts I need some callback functions. Is it possible to create a callback function in a matlab script back to a c++ function?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

装迷糊 2024-12-27 06:30:26

免责声明:我从未亲自测试过这种方法
您可以通过使用 Matlab 构建器 NE 将 Matlab 代码编译为 COM 组件来完成此操作。
该组件将发送 COM 事件,您的应用程序将订阅它们。
请参阅 Matlab Builder NE 文档中的“向 COM 对象添加事件”部分。

您可以在这里阅读有关 COM 的信息:
http://en.wikipedia.org/wiki/Component_Object_Model

Disclaimer : I never tested this approach by myself
You can do it by compiling your Matlab code as COM component using Matlab builder NE.
This component will be sending COM events, and your application will subscribe to them.
See the "Adding Events to COM Objects" section in Matlab Builder NE documentation.

You can read about COM here:
http://en.wikipedia.org/wiki/Component_Object_Model

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文