plotting particles in 2d cartesean manner

2 ビュー (過去 30 日間)
Adrian Lee
Adrian Lee 2020 年 10 月 22 日
コメント済み: KSSV 2020 年 10 月 22 日
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 Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by