Another reason I want to suppress the output of the system command is that I need to invoke this command several times, which clutters the command window.
How to suppress command output on screen?
10 次查看(过去 30 天)
显示 更早的评论
I'm having trouble suppressing the output of a command. I've tried the semicolon and echo off command with no success.
echo off all
system('C:\LSDYNA\program\ls-dyna_smp_s_R610_winx64_ifort101.exe i=beam.k ncpu=4');
This gives the output from the program invoked, which is very long and unnecessary. This snippet is part of a bigger code where I need to print to screen at regular intervals.
Any tips? Thanks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164881/image.jpeg)
回答(1 个)
per isakson
2014-6-27
编辑:per isakson
2014-6-27
Try
str = evalc( 'system(''dir'')' );
and
[ status, cmdout ] = system('dir');
and compare with
system('dir');
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!