MatlabのediterでPythonScriptを変更し、実行しても変更したPythonScriptが反映されません。
Show older comments
Matlab
mod = py.importlib.import_module('Sample01');
result = mod.function(5,2);
disp(result)
Python
def function(a,b):
return a + b
実行すると
7
Pythonを変更
def function(a,b):
return a - b
実行すると
7
MatlabのエディターでPythonの内容を変更しても反映されません。
Matlab自体を再起動すると変更内容が反映されます。
メニューの方にもソースを更新するようなものが見当たりません。
使用しているMatlabは、R2021bのトライアルバージョンです。
使用しているPythonは、3.8.10、OSはWindows10です。
よろしくお願いいたします。
2 Comments
Atsushi Ueno
on 19 Jan 2022
「変更されたユーザー定義 Python モジュールの再読み込み」は参考になりませんか?
かず ほり
on 20 Jan 2022
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!