How to convert python __name__ = '__main__' into MATLAB ?
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
if __name__ == '__main__':
undistorb_images(None, None)
2 commentaires
Réponses (1)
Yongjian Feng
le 24 Juil 2021
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 commentaires
Yongjian Feng
le 27 Juil 2021
Accept the answer please if this fix the problem, then others know how to fix it.
Voir également
Catégories
En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!