Search code examples
c++matlabreal-time

How to enable Matlab to listen real time data through C++ application


I need to create a C++ add-in to Matlab where add-in will listen to packet coming from network and notify Matlab to draw an packet analysis graph. I understood that using a MEX file I can easily call c functions inside Matlab, but I could not find a way to notify Matlab when data is available at C++ end. Is there any way we can pass a user-defined Matlab function pointer into my C++ add-in?

BTW, I found this thread: real-time-data-in-matlab

Unfortunately suggestion is to use ActiveX control, but in my case, I need to create add-in in pure C++.


Solution

  • Have a look at Gurobi. It 'just' prints status information to the command window. Using a mex command like mexCallMATLAB you may access 'any' matlab function.