How can I completely hide the output of an external program that is executed using the SYSTEM / DOS command in MATLAB 7.6 (R2008a)?

11 views (last 30 days)
I would like to execute an external program from within MATLAB. The program usually outputs a lot of data in the command or DOS window, how can I suppress this output?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
You can suppress output from the DOS and SYSTEM commands by specifying two output arguments. For example, the following command should not print any text to the command window:
[x, y] = dos('dir *.*');
[x, y] = system('dir *.*');
In some cases, you may be able to suppress the output by executing the program by using the Windows "start" command. For example:
dos('start myprogram.exe')

More Answers (0)

Categories

Find more on Downloads in Help Center and File Exchange

Products


Release

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!