Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Johannes
Johannes el 25 de Sept. de 2012
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!

Respuestas (1)

Ryan G
Ryan G el 25 de Sept. de 2012
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.

Categorías

Más información sobre C Shared Library Integration en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by