Colored values for cellular automatons

1 view (last 30 days)
I am looking for a way to display the elements of my matrix as red and blue depending on if they are a 1 or 0. I'm fairly new to Matlab so I'm not sure if there is a way to color the actual matrix output in the command window or if I would have to use something like a colormap?
Samuel Brewton
Samuel Brewton on 12 Feb 2021
Yes. I've found a way to print a colored map but I was looking to also display colored text in the command window. (For collaboration reasons I cannot use cprintf)

Sign in to comment.

Accepted Answer

KALYAN ACHARJYA on 13 Feb 2021
pcolor or imagese
Set the colorbar properties as per your requirements

More Answers (0)




Community Treasure Hunt

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

Start Hunting!

Translated by