How to find the distance between pionts?

  • Thread starter hgphtgi
  • Start date
In summary, the conversation is about finding the distance between multiple points on a map using a function in Matlab. The speaker is asking for help in writing a program for nine points and provides resources for distance calculations.
  • #1
hgphtgi
12
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: 619
Last edited:
Physics news on Phys.org
  • #2

1. What is the formula for finding the distance between two points?

The formula for finding the distance between two points (x1,y1) and (x2,y2) is:

Distance = √((x2-x1)^2 + (y2-y1)^2)

2. How do you calculate the distance between points on a graph?

To calculate the distance between two points on a graph, you can use the distance formula or simply measure the length of the straight line connecting the two points. Make sure to use the same units for both the x and y coordinates.

3. Can the distance between points be negative?

No, the distance between points is always a positive value. It represents the length of the straight line connecting the two points and cannot be negative.

4. What is the importance of finding the distance between points?

Finding the distance between points is important in many scientific fields, such as physics, engineering, and geography. It allows us to accurately measure the distance between objects or locations and make calculations and predictions based on this information.

5. Can the distance between points be calculated in any coordinate system?

Yes, the distance formula can be applied in any coordinate system, including Cartesian, polar, or spherical coordinates. However, the coordinates of the two points must be in the same system for the formula to work correctly.

Similar threads

  • Mechanical Engineering
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • Precalculus Mathematics Homework Help
Replies
20
Views
2K
Replies
12
Views
2K
Replies
38
Views
3K
  • Introductory Physics Homework Help
Replies
3
Views
192
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
41
Views
8K
  • Introductory Physics Homework Help
Replies
10
Views
1K
  • STEM Academic Advising
Replies
23
Views
937
Back
Top