matlab上でpythonのユーザー定義関数の編集結果が反映されない。
Show older comments
matlab上でpythonのユーザー定義関数の編集結果が反映されません。
matlabの再起動をすることで、pythonのユーザー定義関数の編集結果が反映されるので、
暫定的にpythonのユーザー定義関数の編集したときは毎回matlabを再起動しています。
恒久的にはmatlabの設定等で、pythonのユーザー定義関数を編集したらただちに反映されてほしいです。
matlabの設定等でこの問題を対処する方法はありませんか?
【実行環境】
・Windows 10
・MATLAB R2021a update 6(最新アップデート)
・Python 3.8.10
matlabワークスペース上で以下を実行
py.test_func.testcal(1,6)
【python側】ファイル名:test_func.py
def testcal(a,b):
return a+b
【出力結果】
ans =
7
pythonのユーザー定義関数を編集し、matlabワークスペース上で以下を実行
py.test_func.testcal(1,6)
【python側】ファイル名:test_func.py
def testcal(a,b):
return a*b % 出力結果を編集(足し算⇒掛け算)
【出力結果】
ans =
7 % 編集結果が反映されず。
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB の Python ライブラリ in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!