필터 지우기
필터 지우기

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

조회 수: 19 (최근 30일)
Md Shahidul Islam
Md Shahidul Islam 2021년 7월 24일
댓글: Yongjian Feng 2021년 7월 27일
if __name__ == '__main__':
undistorb_images(None, None)
  댓글 수: 2
Md Shahidul Islam
Md Shahidul Islam 2021년 7월 24일
Please someone help me.
Rik
Rik 2021년 7월 24일
Have a read here and here. It will greatly improve your chances of getting an answer.

댓글을 달려면 로그인하십시오.

답변 (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
Md Shahidul Islam
Md Shahidul Islam 2021년 7월 27일
Thank you so much sir
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