Plot the numbers of a matrix as points (dots) in a plot
Show older comments
I want to plot the numbers of a matrix as points (dots) in a plot. For example if I have matrix A:
1 0 5 7
3 0 8 4
6 4 5 2
How can I plot it as a whole by having each number of the matrix as a point in the plot?
I mean:
in the position i,j=1,1 where is the number 1 give me 1 dot in the plot at position i,j=1,3 where is number 5 give me 5 dots in the plot at position i,j=3,2 where is number 4 give me 4 dots in the plot and so on. What I want to do is when I have a matrix let’s say 4X3 or 5X8 or in general mXn then I want to create a mXn grid by plot there, any element of the matrix with points. For instance if I have A=[1 2 3 4;5 6 7 8;0 2 3 23] (a 4X3 matrix) how can I create a 4X3 grid in a plot which any number of the matrix appearing in the plot with dots, as an example at the position i,j=1,1 which is the number one in the matrix I want to have 1 dot in the grid ,in the position i,j=3,4 where is the number 23 ,I want to see 23 dots in the grid.
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!