How to find the distance between pionts?

  • Thread starter Thread starter hgphtgi
  • Start date Start date
Click For Summary
SUMMARY

This discussion focuses on calculating the distance between multiple geographic points using MATLAB. The user initially employed the `distance` function with geographic coordinates but sought assistance in developing a complete program to compute distances from a series of specified points. The recommended approach includes utilizing the `pdist` function from the Statistics Toolbox for efficient distance calculations across multiple points. Additionally, references to MATLAB Central provide further insights and examples for users.

PREREQUISITES
  • Familiarity with MATLAB programming environment
  • Understanding of geographic coordinates (latitude and longitude)
  • Knowledge of MATLAB functions, specifically `distance` and `pdist`
  • Basic concepts of distance measurement in a geographic context
NEXT STEPS
  • Explore the `pdist` function in MATLAB Statistics Toolbox for distance calculations
  • Review the MATLAB Central answer on calculating distances between two points
  • Learn about geographic coordinate systems and their implications on distance measurement
  • Investigate other MATLAB functions for spatial analysis, such as `geodist`
USEFUL FOR

This discussion is beneficial for MATLAB users, geographers, data analysts, and anyone involved in spatial data analysis or geographic distance calculations.

hgphtgi
Messages
12
Reaction score
0
Hello My Friends

I am trying to find the distance from 1,1 to all other points then from 2,1 to all other points then from 3,1 to all other points ...etc, until from 3,3 to all other points .
I used this function in Matlab and i got the answer

arclen = distance('gc',[37,-76],[37,-9]);arclen1 = distance('gc',[37,-76],[37,-9]) and i got the answer,

However i need some help to write the full program for these 9 points, could you please try to help?Note: all the points are real on the map an has ( longitude) and ( latitude ).

regards
 

Attachments

  • new.JPG
    new.JPG
    8.3 KB · Views: 687
Last edited:
Physics news on Phys.org

Similar threads

  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 8 ·
Replies
8
Views
4K
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
20
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K