MATLAB Answers

How to find the nearest point for 71 points?

2 views (last 30 days)
Behzad Navidi
Behzad Navidi on 25 Jan 2020
Commented: Behzad Navidi on 26 Jan 2020
Hey all,
I have coordinates.mat which includes the name of 71 climate stations and corresponding latitude and longitude. I want to know the nearest stations. I want something like this:
Station lat lon NEAR_STATION *(NEW COLUMN IN FRONT OF EACH ROW)*
------------------------------------------------------------------------------------------
Ahvaz 20.32 33.3 Abadan
Abadan 20.30 33 Ahvaz
Tehran 36.72 52.5 Qum
I want to find the nearest stations for all these 71 stations. once I know what is the name of the nearest station I can go ahead and using linear regression to reconstruct missing data.
thank you in advance
I attached coordinates.mat

  14 Comments

Behzad Navidi
Behzad Navidi on 26 Jan 2020
Ah, you right. I didn't consider that. after running the code, the output is Ahvaz :(
Behzad Navidi
Behzad Navidi on 26 Jan 2020
I modify my question and post it. Thank you I learn so many things here.

Sign in to comment.

Answers (0)

Sign in to answer this question.

Products


Release

R2018b

Translated by