Borrar filtros
Borrar filtros

plotting particles in 2d cartesean manner

1 visualización (últimos 30 días)
Adrian Lee
Adrian Lee el 22 de Oct. de 2020
Comentada: KSSV el 22 de Oct. de 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 comentario
KSSV
KSSV el 22 de Oct. de 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?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by