Is it possible to print color text in the command window?

61 次查看(过去 30 天)
Is it possible to print color text in the command window?

采纳的回答

madhan ravi
madhan ravi 2018-10-17
编辑:madhan ravi 2018-10-17
  8 个评论
oded s
oded s 2025-1-14
for future reader
as stated, it's possible with cprintf
but it's painfully slow ... (vs fprintf)
the cprintf takes a lot of time , for example :
>>tic ; for k = 1:1e2, cprintf('_blue', '.') ; end ; fprintf('\n') ; toc
....................................................................................................
Elapsed time is 1.819822 seconds.
>> tic ; for k = 1:1e2, fprintf(2,'.') ; end ; fprintf('\n') ; toc
....................................................................................................
Elapsed time is 0.001130 seconds.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Desktop 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by