plotting particles in 2d cartesean manner

1 次查看(过去 30 天)
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 个评论
KSSV
KSSV 2020-10-22
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?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by