calling python function from Matlab

1 回表示 (過去 30 日間)
Abhishek Shahi
Abhishek Shahi 2020 年 7 月 15 日
回答済み: Mohammad Sami 2020 年 7 月 15 日
I have following python code line that I want to call from matlab
def circularize_image(IM, method="lsq", center=None):
I could sucessfully excecute for defining two variable IM and 'lsq'
py.abel.tools.circularize.circularize_image(IM,'lsq')
But I have problem in defining None for the center value. Any suggestion ?
  2 件のコメント
Mohammad Sami
Mohammad Sami 2020 年 7 月 15 日
編集済み: Mohammad Sami 2020 年 7 月 15 日
According to the docs, a missing string value will translate to none in python.
s = string(missing);
py.abel.tools.circularize.circularize_image(IM,'lsq',s)
Abhishek Shahi
Abhishek Shahi 2020 年 7 月 15 日
Thanks , it works..

サインインしてコメントする。

採用された回答

Mohammad Sami
Mohammad Sami 2020 年 7 月 15 日
Moved to answer
According to the docs, a missing string value will translate to none in python.
s = string(missing);
py.abel.tools.circularize.circularize_image(IM,'lsq',s)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by