calling python function from Matlab

1 Ansicht (letzte 30 Tage)
Abhishek Shahi
Abhishek Shahi am 15 Jul. 2020
Beantwortet: Mohammad Sami am 15 Jul. 2020
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 Kommentare
Mohammad Sami
Mohammad Sami am 15 Jul. 2020
Bearbeitet: Mohammad Sami am 15 Jul. 2020
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 am 15 Jul. 2020
Thanks , it works..

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Mohammad Sami
Mohammad Sami am 15 Jul. 2020
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)

Weitere Antworten (0)

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by