Distances between specific points between two points

2 visualizaciones (últimos 30 días)
Chihiro Omori
Chihiro Omori el 25 de Abr. de 2019
Comentada: nehad mohamed el 7 de En. de 2021
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 comentarios
darova
darova el 27 de Abr. de 2019
Untitled.png
Find horde
nehad mohamed
nehad mohamed el 7 de En. de 2021
I want a tool like a ruler to measure distances in dicom images. In cm. using matlab

Iniciar sesión para comentar.

Respuestas (2)

Mark Sherstan
Mark Sherstan el 25 de Abr. de 2019
Editada: Mark Sherstan el 25 de Abr. de 2019
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 el 7 de En. de 2021
I want a tool like a ruler to measure distances in dicom images. In cm. using matlab

Categorías

Más información sobre Geometric Transformation and Image Registration en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by