필터 지우기
필터 지우기

How to use an existing Matlab session from C++ ?

조회 수: 1 (최근 30일)
Johannes
Johannes 2012년 9월 25일
Hi, I want to use Matlab to display data which is generated by my C++ program. I found a nice interface to get the data to Matlab on File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/20927-cc++-and-matlab-types-convertor
The thing is that on every run of the program a Matlab instance is opened and then closed. Starting Matlab takes always a few seconds, I want to avoid that. Does anybody know a possibility to connect to an existing Matlab session? On Windows is this -automation start flag, is there something similar on Unix systems? Thank you for answers!

답변 (1개)

Ryan G
Ryan G 2012년 9월 25일
You could use something like the MATLAB Compiler to generate an executable of the functions you want to use and call that instead of MATLAB code. The compiled MATLAB function does require the MCR on the PC it is being run from.
I don't believe figures are supported with MATLAB Coder but if you are doing more generic data processing that does not require plotting functions you can generate c-code to tie into the code you already have with MATLAB coder.

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by