Supress Command Line messages: system.m
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Matlab2010
am 8 Okt. 2013
Beantwortet: Sean de Wolski
am 8 Okt. 2013
I combine some text files into one big file:
system('copy 1.txt+2.txt+3.txt MyBigFat.txt')
This works fine, however it writes to the command line all the file names "1.txt 2.txt..." followed by "1 file(s) copied". As I am keeping a diary and also doing this operation a very large number of times, I do not wish to see the file copied message.
how can I prevent it being shown? Is there a way to supress output using system.m?
using 2013A and win7.
thanks
0 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 8 Okt. 2013
Either capture the outputs:
[st,rt] = system('copy 1.txt+2.txt+3.txt MyBigFat.txt');
Or if that does not supress it, then use evalc to evaluate and capture output.
evalc('system(''copy 1.txt+2.txt+3.txt MyBigFat.txt'');');
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Debugging and Analysis 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!