display different colors in command window, using command "disp" or similar

I want sections of my display to be in differnt colors. (Matlab 2009)
ex:
disp('Hello matlab Central!')
Is it possible to get that text in example red?
disp('Hello matlab Central','red')
Thanks

댓글 수: 1

Apparently not. With more current version, simple things like cprintf and fprintf are not valid either.

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

답변 (2개)

Chunguang LI
Chunguang LI 2021년 4월 20일

4 개 추천

fprintf(2,'only red\n'); %2 for standard error.
Evgeny Pr
Evgeny Pr 2013년 1월 25일

1 개 추천

Use cprintf function.
This is an undocumented feature!

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

질문:

Per
2013년 1월 25일

답변:

2021년 4월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by