フィルターのクリア

Why do I receive Coder Extrinsic undefined function error on Simulink function block?

7 ビュー (過去 30 日間)
Moein Sabounchi
Moein Sabounchi 2020 年 5 月 10 日
コメント済み: Chandni S Vijay 2023 年 1 月 4 日
I am trying to compile a python function written in python 3.6 in a simulink function block using coder extrinsic. However, I have been having two very wierd issues:
  1. In many cases, the matlab gives an error that function "py.A1.test1" is undefined for the type double, which they are not and are in the same folder as the simulink model.
  2. When I can get it to work on very simple python functions like adding inputs, when I try to change the python function (while keeping the same names for python files and function) and re-run the simulation that calls the python function, it uses the old (previous version) of the python function rather than the updated one.
Are these two bugs in the model or I am missing something as I receive similar errors in 2019 and 2020a versions. The exact error messages are as following:
Undefined function 'py.A1.test2' for input arguments of type 'double'. Error in 'abdaasdasd/MATLAB Function' (line 4) out = py.A1.test2(in1,in2);
Component:Simulink | Category:Model error
An error occurred while running the simulation and the simulation was terminated
Caused by:
  • Simulation stopped because of a runtime error.
Component:Simulink | Category:Block error
  2 件のコメント
Monika Phadnis
Monika Phadnis 2020 年 5 月 13 日
You can check this documentation link for the second query you mentioned.
It is for reloading modified python modules.
Hope this helps.
Chandni S Vijay
Chandni S Vijay 2023 年 1 月 4 日
I'm also facing the same issue as mentioned in point 1. If resolved could you provide the solution?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangePython Package Integration についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by