How to display colour in command window output

20 visualizzazioni (ultimi 30 giorni)
If I have an if statement with conditions, how do I print a statement in different colours in the Command Window?
eg.
if x = 3
test = ' True' (in blue)
else test = 'False' (in red)
end
  1 Commento
Redmer Van Tijum
Redmer Van Tijum il 15 Ago 2019
Please look at the fileexchange. cprintf is the developed code. It is not that straightforward.
\
Cheers

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 29 Lug 2015

Più risposte (0)

Categorie

Scopri di più su Argument Definitions in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by