
Receive error: matlab.engine.MatlabExecutionError: Too many output arguments.
조회 수: 6 (최근 30일)
이전 댓글 표시

Dear all,
I'm trying to create a simulink model using a python script. after many tries i get the error shown in the picture.
Explicitly setting nargout=0 for all non-output MATLAB calls in the script already did. Example:
or
Could you give me suggestions on what else I could try to fix the errors?
Thank you very much!
댓글 수: 0
채택된 답변
Hitesh
2025년 1월 4일
편집: Hitesh
2025년 1월 4일
I too encountered this error, the workaround that worked for me was to reinstall the "matlabengine" module. Kindly ensure that you need to run following command in this directory "matlabroot\extern\engines\python".
pip install matlabengine
I have revised and executed your script without any errors. I have saved the model and attached it for your reference.Kindly refer to the below image for the revised script.

For more information regarding "ModuleNotFoundError: No module named 'matlabengineforpython3_X' ", kindly refer to the following MATLAB Answer:
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Integration with Online Platforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!