Why does accessing Python object in Simulink error with "Attempt to extract field 'path' from 'mxArray'."
이전 댓글 표시
이 질문에 Walter Roberson
님이 플래그를 지정함
I'd like to import a Python module in Simulink, and then use the properties/functions of the module. In this example, I want to access the properties and call functions of "out_class_instance".
function out_class_instance = my_matlab_func()
coder.extrinsic('py.my_python_file.my_python_class')
out_class_instance = py.my_python_file.my_python_class('exampleInput');
end
When using either a 'MATLAB Function' or 'MATLAB System' block, I get the following error message:
Simulink detected an error 'Attempt to extract field 'path' from 'mxArray'.'
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Implement Blocks with System Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!