필터 지우기
필터 지우기

plotting particles in 2d cartesean manner

조회 수: 1 (최근 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 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