Here is my python code
DosCmd = 'matlab -wait -automation -nosplash -r "run \'' + to_run + "'\""
os.system(DosCmd)
curve_file = open('curve/'+str(index)+'.curve','r')
I run a .m file in a python script,it works fine but after executing the .m file,it is stuck in os.system(DosCmd)
.
To make python run the following code,I have to close this window:
Since this part of code is in a loop,it really disturbs me. I found someone on the Internet says that matlab can exits automatically after executing the .m file,but mine just doesn't.Will someone tell what I did wrong or what should I do?Thx!