How to use an existing Matlab session from C++ ?
1 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 C Shared Library Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!