How to convert python __name__ = '__main__' into MATLAB ?

19 次查看(过去 30 天)
if __name__ == '__main__':
undistorb_images(None, None)

回答(1 个)

Yongjian Feng
Yongjian Feng 2021-7-24
Not sure about what you really want.
For python code,
if __name__ == '__main__':
it means your python script is running as the main program by the python interpreter (as opposite to being imported by some other python scripts).
This is equivalent to a separate matlab script that calls the first matlab script.
  5 个评论
Yongjian Feng
Yongjian Feng 2021-7-27
Accept the answer please if this fix the problem, then others know how to fix it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Call Python from MATLAB 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by