How can I plot a few dots in matrix plot?

2 views (last 30 days)
for example, I want to plot this one:

Accepted Answer

KSSV
KSSV on 3 Dec 2021
Edited: KSSV on 3 Dec 2021
[X,Y] = meshgrid(1:5,1:5) ;
plot(X,Y,'*')
A = ones(5) ;
spy(A)

More Answers (1)

Walter Roberson
Walter Roberson on 3 Dec 2021
[X,Y] = meshgrid(6:6:24);
scatter(X, Y, 'b*')
xlim([0 30]); ylim([0 30])

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!