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

 Risposta accettata

madhan ravi
madhan ravi il 17 Ott 2018
Modificato: madhan ravi il 17 Ott 2018

8 Commenti

If it works make sure to accept the answer
i have matlab in my mobile and this function doesn't work in it why ):
It works at command window only. :)
Right, this uses technology that only applies to the command window, not to LiveScript and not to MATLAB Mobile.
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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Environment and Settings in Centro assistenza e File Exchange

Tag

Richiesto:

il 17 Ott 2018

Commentato:

il 14 Gen 2025

Community Treasure Hunt

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

Start Hunting!

Translated by