How to display colour in command window output

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

Please look at the fileexchange. cprintf is the developed code. It is not that straightforward.
\
Cheers

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

Jay
2015년 7월 29일

댓글:

2019년 8월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by