pythonから指定フォルダに存在するMATLABスクリプトを呼び出したい
显示 更早的评论
pythonプログラムからMatlabエンジンAPIを用いて、Matlabスクリプト(mファイル)の実行を行う際、以下URLにあるように
import matlab.engine
eng = matlab.engine.start_matlab()
eng.triarea(nargout=0)
として呼び出すことで、triarea.m ファイルが実行出来ると思います。
この時、pythonプログラムのpyファイルと同階層(同フォルダ)にmファイルが存在しないと、'triarea'が認識されません。
pyファイルと同階層ではない、指定フォルダに存在するMatlabスクリプトを呼び出して実行することは可能でしょうか?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Python からの MATLAB の呼び出し 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!