I am currently involved in a project in which data would be transferred from MATLAB to a C++ GUI created. The data would be processed and sent back to the GUI. I explored the options of MEX files and the MatLAB Compiler. Are there any methods for achieving "real time" data transfer?

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2011년 12월 13일

0 개 추천

MATLAB does not run on any real-time operating systems, so the concept of real-time with MATLAB is a little shaky. You could achieve a soft real-time system however, if you're willing to live with OS-related delays and you are not acquiring/transferring data to hardware that needs to meet a strict time-table.
You've already explored MEX-files and MATLAB Compiler. One other option that I can think of is calling into MATLAB as a COM Server or using the MATLAB Engine interface, which uses COM on Windows.

댓글 수: 2

Richard
Richard 2011년 12월 14일
Thank you for your response. I will look into using the MATLAB engine as I see it is recommended for C++ programming.
Will I be able to access models stored in Simulink using the MATLAB engine approach?
Kaustubha Govind
Kaustubha Govind 2011년 12월 14일
Yes, you can use the Simulink command-line interface and execute commands using engEvalString.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Call MATLAB from C에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by