How can I connect python script and mfile?

Hello, I have a problem with my connection between Python script and matlab.
I need call all from py-script. Open mfile, start run(F5) and save results.
It can be possible? And if yes, how?
Beforehand, I thank you for all the help.

답변 (1개)

the cyclist
the cyclist 2017년 4월 10일

0 개 추천

It is the first link that came up when I googled call matlab from python.

댓글 수: 4

PeterHouse
PeterHouse 2017년 4월 10일
편집: PeterHouse 2017년 4월 10일
Yes, I read. But this syntaxes are doing nothing in my script
Stephen23
Stephen23 2017년 4월 10일
편집: Stephen23 2017년 4월 10일
@Lubos Helebrant: what exactly does "doing nothing" mean? Do you get any error message (if so, what exactly), or a warning, or do you get incorrect values, or does your computer catch fire? How are we supposed to know what "does nothing" means ?
the cyclist
the cyclist 2017년 4월 10일
편집: the cyclist 2017년 4월 10일
Also, can you successfully run this simple example from the documentation?
import matlab.engine
eng = matlab.engine.start_matlab()
tf = eng.isprime(37)
print(tf)
If you can't get that to work, there is no point to figuring out your (presumably more complicated) actual code.
PeterHouse
PeterHouse 2017년 4월 11일
편집: PeterHouse 2017년 4월 11일
I'm sorry I didn't install the correct matlab.engine library. Can I find it somewhere here? Specific library?

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

카테고리

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

질문:

2017년 4월 10일

편집:

2017년 4월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by