C++ callbacks to matlab?

조회 수: 15 (최근 30일)
Serena
Serena 2013년 3월 22일
Hi,
I have some C++ code and I would like to integrate it with matlab. Basically data is sent to the C++ code and the C++ code executes a callback. i would like this callback to be on the matlab side. is that possible?
Thanks, Serena

답변 (1개)

James Tursa
James Tursa 2013년 3월 22일
See the C/C++ API documentation:
You can basically write your C++ code as a mex function (it operates like an m-file function callable from MATLAB) which can itself call back into MATLAB via the mexCallMATLAB function.
Or you can write a C++ program that calls into what is called a MATLAB Engine, which is a separate process from your C++ program so it requires copying all data into and out of the Engine (you can often avoid this copying with the mex function approach above)

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by