- 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.
Matlab Coder and Python
조회 수: 14 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (1개)
Areej Varamban Kallan
2023년 2월 3일
Hi Fiona,
The following document has examples describing how you can call MATLAB Coder generated functions from external C code.
I suggest:
I hope this helps.
Thanks,
Areej
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!