Visualizing values in a matrix
3 次查看(过去 30 天)
显示 更早的评论
Hi there,
I wrote a script that runs loops on a 100x100 matrix and changes values within. That matrix only contains ZEROS and ONES and I would like to visualize the development of the ONES for each iteration.
From what I gathered, I 'pcolor' is the way to go but I am not at all sure how to implement that.
Lets say it is only a 10x10 matrix, like so:
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0
I would like to turn this into something like this:
The numbers for row and column are not needed and neither is the outer border...
I am sure it turns out to be a simple one-liner ... So, if anyone of you know how, please help.
Your help is much appreciated!!!
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!