Effacer les filtres
Effacer les filtres

Can I use MATLAB Engine API for C++ for compiled standalone applications?

4 vues (au cours des 30 derniers jours)
Hi there,
We are planning to create a small standalone application (using MATLAB compiler) that performs some calculations and displays/updates plots in real-time (e.g. once every second). The data is generated by C++ code, which in turn receives measurements and preprocesses it.
Can I use the "MATLAB Engine API for C++" for this case?
I assume that this is not possible because the C++ application would need to interface the MATLAB Runtime. (The page "MATLAB Engine API for C" says: "Engine applications require an installed version of MATLAB; you cannot run the MATLAB engine on a machine that only has the MATLAB Runtime.")
Hence, I guess we need to wrap our C++ code using MEX and call it from the compiled standalone application. Is this correct or is there a better way?

Réponse acceptée

Kojiro Saito
Kojiro Saito le 14 Sep 2021
The link (MATLAB Engine API for C) is the interface in which MATLAB is called from C.
If your C++ application can be called from MATLAB, you can use C++ interface from MATLAB.
  2 commentaires
Steven Brossi
Steven Brossi le 15 Sep 2021
Thanks for the hint.
Indhu Priyadharshini Govindasamy
Could you please help me with this?
(the problem is using mxArray i am creating Matrix in workspace and hardcoding the values. i dont want to hardcode the values like this)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur C Shared Library Integration dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by