Is it possible to print color text in the command window?
172 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mr M.
am 17 Okt. 2018
Kommentiert: oded s
am 14 Jan. 2025
Is it possible to print color text in the command window?
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 17 Okt. 2018
Bearbeitet: madhan ravi
am 17 Okt. 2018
yes its possible , see the link below: Edited: https://www.mathworks.com/matlabcentral/fileexchange/24093-cprintf-display-formatted-colored-text-in-the-command-window
8 Kommentare
oded s
am 14 Jan. 2025
for future reader
as stated, it's possible with cprintf
but it's painfully slow ... (vs fprintf)
the cprintf takes a lot of time , for example :
>>tic ; for k = 1:1e2, cprintf('_blue', '.') ; end ; fprintf('\n') ; toc
....................................................................................................
Elapsed time is 1.819822 seconds.
>> tic ; for k = 1:1e2, fprintf(2,'.') ; end ; fprintf('\n') ; toc
....................................................................................................
Elapsed time is 0.001130 seconds.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations 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!