calculate distance and angles between points in a grid
Show older comments

I have created a grid of this type where for each point I know the coordinates and each point of the grid is one degree both in latitude and in longitude. I therefore have to calculate the distance in km and the angle in degrees from the blue point (x = 14.75: y = 40.5) to all the other orange points.
I created a function to calculate the distances and angles between two points, but where I always have to enter the coordinate values and I would like to avoid this step. I wonder, is it possible to calculate the distances and angles for all these points without manually entering the coordinate values?
3 Comments
darova
on 5 Sep 2021
Attach your code
Drishan Poovaya
on 6 Sep 2021
It would be helpful if you could share your function which you have created, as well as data of the orange grid you have created. It would then be possible to vectorize or maybe loop the function to calculate all the distances and angles
ELISABETTA BILLOTTA
on 6 Sep 2021
Edited: darova
on 8 Sep 2021
Accepted Answer
More Answers (0)
Categories
Find more on Cartesian Coordinate System Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!