필터 지우기
필터 지우기

Perpendicular distance beween two 3D points

조회 수: 2 (최근 30일)
PPM
PPM 2022년 8월 29일
댓글: Chunru 2022년 8월 29일
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!

답변 (1개)

Chunru
Chunru 2022년 8월 29일
편집: Chunru 2022년 8월 29일
d = sqrt((x1-x2).^2 + (y1-y2).^2); % it does not depend on z
  댓글 수: 2
PPM
PPM 2022년 8월 29일
Thanks for your answer. Sorry but I am very obtuse in geometry. In terms of the attached image, what its inside of the parenthesis means "the square of the x coordinate of 1 + the square of the y coordinate of 2" is this correct?
Chunru
Chunru 2022년 8월 29일
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

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

카테고리

Help CenterFile Exchange에서 Computational Geometry에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by