System Command Output not Appearing in Command Window
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 4 de Mzo. de 2013
If you run the fortran program outside of MATLAB do the final values appear?
Parker
el 4 de Mzo. de 2013
Editada: Parker
el 4 de Mzo. de 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.
Respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!