display different colors in command window, using command "disp" or similar
415 views (last 30 days)
Show older comments
Per on 25 Jan 2013
Answered: Chunguang LI on 20 Apr 2021
I want sections of my display to be in differnt colors. (Matlab 2009)
disp('Hello matlab Central!')
Is it possible to get that text in example red?
disp('Hello matlab Central','red')
Ronald Hartwig on 27 Oct 2018
Apparently not. With more current version, simple things like cprintf and fprintf are not valid either.
Chunguang LI on 20 Apr 2021
fprintf(2,'only red\n'); %2 for standard error.
Evgeny Pr on 25 Jan 2013
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!