Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ matlab engine c++ callback function

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?

like image 668
Tiddo Avatar asked Nov 19 '25 17:11

Tiddo


1 Answers

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

like image 126
Andrey Rubshtein Avatar answered Nov 22 '25 06:11

Andrey Rubshtein



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!