Distances between specific points between two points

조회 수: 2 (최근 30일)
Chihiro Omori
Chihiro Omori 2019년 4월 25일
댓글: nehad mohamed 2021년 1월 7일
With Matrix of longitudes and latitudes, I would like to set the standard point on (lat, lon) = (40 -75)
and calculate the distances (in meter) between the standard point and each point (lat and lon individually).
My code is as follows.
x0 = 0;
y0 = 0;
lat0 = 40;
lon0 = -75;
dlat = latmat - lat0;
dlon = lonmat - lon0;
dx = 110*cosd(latmat)*dlon;
dy = 110*dlat;
x = 1000* (dx + x0);
y = 1000* (dy + y0):
The problem is Distances of X are extremely larger than those of Y.....
  댓글 수: 4
darova
darova 2019년 4월 27일
Untitled.png
Find horde
nehad mohamed
nehad mohamed 2021년 1월 7일
I want a tool like a ruler to measure distances in dicom images. In cm. using matlab

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

답변 (2개)

Mark Sherstan
Mark Sherstan 2019년 4월 25일
편집: Mark Sherstan 2019년 4월 25일
Use this awesome function from the file exchange: https://www.mathworks.com/matlabcentral/fileexchange/38812-latlon-distance and then place it in a loop to store your results in an array or otherwise.

nehad mohamed
nehad mohamed 2021년 1월 7일
I want a tool like a ruler to measure distances in dicom images. In cm. using matlab

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by