producing colored letters in an if statement
조회 수: 1 (최근 30일)
이전 댓글 표시
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
Jan
2012년 7월 30일
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?
채택된 답변
Daniel Shub
2012년 7월 30일
편집: Daniel Shub
2012년 7월 30일
cprintf('red', 'Do That');
댓글 수: 3
Daniel Shub
2012년 7월 30일
편집: Daniel Shub
2012년 7월 30일
@Walter, thank you
@Salva sorry about that, I got the syntax wrong. I edited the answer to the correct way.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!