Is it possible to print color text in the command window?

86 vues (au cours des 30 derniers jours)
Mr M.
Mr M. le 17 Oct 2018
Commenté : oded s le 14 Jan 2025
Is it possible to print color text in the command window?

Réponse acceptée

madhan ravi
madhan ravi le 17 Oct 2018
Modifié(e) : madhan ravi le 17 Oct 2018
  8 commentaires
Benjamin Dolgin
Benjamin Dolgin le 22 Août 2024
Thank you
oded s
oded s le 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Desktop dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by