
Receive error: matlab.engine.MatlabExecutionError: Too many output arguments.
10 ビュー (過去 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:


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!