How can I plot the items of a matrix with a specific coordinates in matlab?
显示 更早的评论
Hello everybody. I need your help about a problem that I have in matlab. I need to plot the items of a matrix with a specific coordinates. For instance lets say that I have the matrix
A=[ 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 2 2 2 2 2]
And I want to plot every item of my matrix as a dot in a plot with axis for instance 10x10 units ( or it could be 50x50 this is not my point). I want to divide this in smaller grid and assume my first grid it consist 5 sub-grids which is 2x2 . So I’m saying that my 10x10 axis consists of 25 pixels with the dimension 2x2. How can I plot each item of my matrix in the subgroup of 2x2 pixel with specific coordinates? May be is a bit confusing what I’m asking indeed. For that reason I made a pattern in excel in order to illustrate what I want to do. Each item of my matrix is being corresponded with specific coordinates in the plot, for example the number 1 in first row and fist column of my matrix is actually one dots in the first sub-grid with x,y coordinates (0.5,9.5) respectively ,where the number 4 in forth row and fifth column of my matrix is 4 dots of the corresponded sub-grid and every dot has coordinates as it seems below and so on.

The chart in the excel it look like this

thank you in advanced
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Polar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!