How do you print a string in MATLAB in color?

前端 未结 2 1928
遥遥无期
遥遥无期 2021-01-11 19:59

Usually when you print a string in MATLAB:

disp(\'this will print black letters\')

Can it be printed in color instead?

相关标签:
2条回答
  • 2021-01-11 20:14

    In MATLAB Central-File, I find this function: cprintf

    I hope this solve your question.

    0 讨论(0)
  • 2021-01-11 20:16

    If you fprintf() to stderr, it can come out in another colour (depending on your preferences, I think).

    There is undocumented functionality you can (ab)use to get more than this, though.

    0 讨论(0)
提交回复
热议问题