MatlabのediterでPythonScriptを変更し、実行しても変更したPythonScriptが反映されません。
Ältere Kommentare anzeigen
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 Kommentare
Atsushi Ueno
am 19 Jan. 2022
「変更されたユーザー定義 Python モジュールの再読み込み」は参考になりませんか?
かず ほり
am 20 Jan. 2022
Antworten (0)
Kategorien
Mehr zu MATLAB の Python ライブラリ finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!