how to use pyrunfile Python inside a .m file?

I am trying to call a python script from MATLAB. It looks like pyrunfile("main.py") command works well in the command window but when I try to wrap it within a .m file, it just says " continue entering statement". How do I wrap pyrunfile command in my .m file? Thanks.

댓글 수: 2

Hi,
I understand that you are unable to call a python script from MATLAB even though you can call it from the command line. I am unable to reproduce the error message and I can successfully run a python script using python 3.9 on MATLAB R2022a.
Can you share the python script and the .m file that you are trying to execute?
Nadatimuj
Nadatimuj 2022년 6월 9일
It was probably some mistake by me. Sorry. It looks like it works.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

제품

릴리스

R2022a

태그

질문:

2022년 6월 4일

댓글:

2022년 6월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by