calling python function from Matlab

1 visualización (últimos 30 días)
Abhishek Shahi
Abhishek Shahi el 15 de Jul. de 2020
Respondida: Mohammad Sami el 15 de Jul. de 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 comentarios
Mohammad Sami
Mohammad Sami el 15 de Jul. de 2020
Editada: Mohammad Sami el 15 de Jul. de 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 el 15 de Jul. de 2020
Thanks , it works..

Iniciar sesión para comentar.

Respuesta aceptada

Mohammad Sami
Mohammad Sami el 15 de Jul. de 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)

Más respuestas (0)

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by