Matlab Coder and Python
Afficher commentaires plus anciens
I am trying to import C functions into python with ctpyes. The C functions were created as a shared dynamic library with Matlab Coder. The one issue is the EmxArray, I cannot instantiate this variable in python so that it can be passed from the C function into my python script. Has anyone tried this before?
Réponses (1)
Areej Varamban Kallan
le 3 Fév 2023
0 votes
Hi Fiona,
The following document has examples describing how you can call MATLAB Coder generated functions from external C code.
I suggest:
- Write a wrapper function in C that accepts data from python. In this function create the appropriate emxArrays as discussed in the documentation and pass them to the MATLAB Coder generated function.
- Call this wrapper function from python.
I hope this helps.
Thanks,
Areej
Catégories
En savoir plus sur Call Python from MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!