フィルターのクリア

Matlab Coder and Python

16 ビュー (過去 30 日間)
Fiona Senchyna
Fiona Senchyna 2023 年 1 月 27 日
回答済み: Areej Varamban Kallan 2023 年 2 月 3 日
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?

回答 (1 件)

Areej Varamban Kallan
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:
  1. 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.
  2. Call this wrapper function from python.
I hope this helps.
Thanks,
Areej

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by