MatlabのediterでPythonScriptを変更し、実行しても変更したPythonScriptが反映されません。
古いコメントを表示
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 件のコメント
Atsushi Ueno
2022 年 1 月 19 日
「変更されたユーザー定義 Python モジュールの再読み込み」は参考になりませんか?
かず ほり
2022 年 1 月 20 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で MATLAB の Python ライブラリ についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!