plotting points in 3D using distances between them

2 visualizaciones (últimos 30 días)
Ahilya Sawh
Ahilya Sawh el 15 de Mayo de 2018
Comentada: Ahilya Sawh el 16 de Mayo de 2018
Hello, I have a matrix of distances between 10 points. i.e. distance between point 1 and all others, distance between point 2 and all others, etc. Is there a way to plot the positions of these points in a 3D graph based on the distance information? Thank you for your help!
  2 comentarios
KSSV
KSSV el 16 de Mayo de 2018
Yes there are multiple options to plot. What exactly you expecting? Any pictorial example? If you want to show as points you can use plot3 and scatter.
Ahilya Sawh
Ahilya Sawh el 16 de Mayo de 2018
Hello, Thank you for your reply, either plot3 or scatter would be great, but I am at a loss of how to use the matrix of distances as the input instead of x,y,z coordinates. For example, here is a sample 5x5 matrix of the distances between 5 points:
0.0 1.1 1.2 1.3 1.4
1.1 0.0 1.2 1.3 1.3
1.2 1.2 0.0 1.1 1.1
1.3 1.3 1.1 0.0 1.0
1.4 1.3 1.1 1.0 0.0
Row 1 is the distances between point 1 and points 2, 3, 4, 5. The diagonal values are zero since each is the distance between a point and itself. Could you please advise me on how to input this into plot3 or scatter to create a 3D plot?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Etiquetas

Productos


Versión

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by