MATLAB Answers


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

Asked by Per
on 25 Jan 2013
Latest activity Commented on by Ronald Hartwig on 27 Oct 2018
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')

  1 Comment

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

Sign in to comment.

1 Answer

Answer by Evgeny Pr on 25 Jan 2013

Use cprintf function.
This is an undocumented feature!


Sign in to comment.