Hi all,

I'd like to run a Matlab script from within my Stata Do-File. Haven't done this before, but shell appears to be the right Stata command for my needs (the Do-File should wait until the Matlab script is finished). However, using shell my Do-File only opens the Matlab script and, unfortunately, doesn't actually execute it without me pressing "Run" in Matlab.

At the moment I'm stuck with:
Code:
di "Do-File begins now"
shell C:\Users\...\MyMatlabScript.m
di "Do-File complete!"
I assume I'm missing out on some command following shell... Probably one that executes the Matlab script and quits Matlab in the following. Has anyone done this before and could point me to the right direction?

Best
Christian