フィルターのクリア

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 Center および File ExchangeC Shared Library Integration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by