Perpendicular distance beween two 3D points
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi All,
I have two 3D points in space with x, y, and z coordinates (1 and 2, red dots in the image). I want to calcuate "d". I know a bit about euclidean distances and pdist2 but not sure if this is what I need. Can someone help me?
Thanks in advance!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1110350/image.png)
0 Kommentare
Antworten (1)
Chunru
am 29 Aug. 2022
Bearbeitet: Chunru
am 29 Aug. 2022
d = sqrt((x1-x2).^2 + (y1-y2).^2); % it does not depend on z
2 Kommentare
Chunru
am 29 Aug. 2022
The square of the distance/difference along x direction between the two points + The square of the distance/difference along y direction between the two points
Siehe auch
Kategorien
Mehr zu Computational Geometry finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!