producing colored letters in an if statement
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Is there any way to display the warning ‘Do that’ in the below if statement in red colour so that it can stand out?
If
'Do that'
end
thanks
1 Commento
Jan
il 30 Lug 2012
Do you mean inside the source code, when it is displayed in the editor? Or when printed to paper? Or displayed as strings in the command window? Or in a editable text field in a GUI?
Risposta accettata
Daniel Shub
il 30 Lug 2012
Modificato: Daniel Shub
il 30 Lug 2012
cprintf('red', 'Do That');
3 Commenti
Daniel Shub
il 30 Lug 2012
Modificato: Daniel Shub
il 30 Lug 2012
@Walter, thank you
@Salva sorry about that, I got the syntax wrong. I edited the answer to the correct way.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Environment and Settings 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!