plotting particles in 2d cartesean manner

2 views (last 30 days)
Adrian Lee
Adrian Lee on 22 Oct 2020
Commented: KSSV on 22 Oct 2020
I have plotted a particle map using the scatter plot using this code
%generated array of particles
x = 1:delta:10;
y = 1:delta:10;
shown_graph = zeros(length(x),length(y));
%plotting points into graph
[xpoint ypoint] = find(shown_graph == 0);
scatter(xpoint,ypoint,100,'.');
a problem i have with this method is that the particles are in a matrix format and not very helpful
is there a way to achieve the same result but in terms of x and y coordinates separately?
ie: (0,0),(0,1),(1,0),(1,1)... etc
such that i do not have to use the
shown_graph = zeros(length(x),length(y));
[xpoint ypoint] = find(shown_graph == 0);
part
instead
because i want to be able to vary the distance between the points
  1 Comment
KSSV
KSSV on 22 Oct 2020
You need to be more clear about your question....
shown_graph = zeros(length(x),length(y));
%plotting points into graph
[xpoint ypoint] = find(shown_graph == 0);
scatter(xpoint,ypoint,100,'.');
The above lines are meaning less, you have intiated shown_graph as all zeros, and obviously when you seek zeros, you will get all the points. What exactly you are trying?

Sign in to comment.

Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!