MATLAB: Producing colored letters in an if statement

if statement

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

Best Answer

You can do this with Yair's FEX:cprintf. Once you download and install the tool, you can do
cprintf('red', 'Do That');