Colored values for cellular automatons
3 次查看(过去 30 天)
显示 更早的评论
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?
2 个评论
采纳的回答
KALYAN ACHARJYA
2021-2-13
pcolor or imagese
pcolor(mat_data);
colorbar
Set the colorbar properties as per your requirements
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!