plotting points in 3D using distances between them

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

KSSV
KSSV 2018년 5월 16일
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.
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?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

제품

릴리스

R2016b

태그

질문:

2018년 5월 15일

댓글:

2018년 5월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by