System Command Output not Appearing in Command Window
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
I've been battling with the system command recently and am absolutely stumped. I am running on Mac OS X 10.7, MATLAB 2012a (7.14) and in the bash shell. I have an external script that I can successfully run from MATLAB, but the intermediate output from this script is not echoed back to the command window. I have tried system('MyCommand','-echo') with no success. When I run it in Terminal, I get all kinds of intermediate info, such as convergence criterion, residuals, etc., but this is not the case when I run the script via MATLAB.
I'm absolutely stumped and have no idea why the '-echo' flag isn't working. Any thoughts?
Thanks!
8 Kommentare
Walter Roberson
am 4 Mär. 2013
If you run the fortran program outside of MATLAB do the final values appear?
Parker
am 4 Mär. 2013
Bearbeitet: Parker
am 4 Mär. 2013
Yes. But to be fair, it is flushing output line by line, so there couldn't have been any surprises there.
In any case, the point is everything was fine with previous Matlab releases...
Also, the "workaround" to flush each line independently as I presented previously is actually quite a bad idea, as it significantly slows down execution time if you also write things in text files.
It is far better to use
setenv('GFORTRAN_UNBUFFERED_PRECONNECTED','1')
But this is still only a workaround.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!