printOrange Print orange-colored stringToPrint to the MATLAB Command Window. Only if MATLAB is open with GUI, does not work with command-line MATLAB. Input: stringToPrint string that should be printed in orange color Usage: printOrange(stringToPrint)
0001 function printOrange(stringToPrint) 0002 % printOrange 0003 % Print orange-colored stringToPrint to the MATLAB Command Window. Only 0004 % if MATLAB is open with GUI, does not work with command-line MATLAB. 0005 % 0006 % Input: 0007 % stringToPrint string that should be printed in orange color 0008 % 0009 % Usage: printOrange(stringToPrint) 0010 try useDesktop = usejava('desktop'); catch, useDesktop = false; end 0011 if useDesktop 0012 fprintf(['[\b' stringToPrint,']\b']) 0013 else 0014 fprintf(stringToPrint) 0015 end 0016 end