How to convert python __name__ = '__main__' into MATLAB ?
조회 수: 19 (최근 30일)
이전 댓글 표시
if __name__ == '__main__':
undistorb_images(None, None)
댓글 수: 2
답변 (1개)
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
2021년 7월 27일
Accept the answer please if this fix the problem, then others know how to fix it.
참고 항목
카테고리
Help Center 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!