I have a matrix of zeros and ones and I want to plot the ones in their location in the matrix. So that it will look like the matrix but instead of ones a marker and instead of zeros nothing. Is there a function for doing this or I need to get the x and y for every one and then just do a simple scatter plot? Thank you for the help!
Try the function spy
, it plots a blue dot for every non-zero entry of a matrix.
imagesc
is an approach for this that I find useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With