i have 2 column of data latitude & longitude. how can i get the distance from a point(Lat-1,long-1) to all other points?

1 回表示 (過去 30 日間)
prajith kc
prajith kc 2014 年 2 月 19 日
回答済み: Jos (10584) 2014 年 2 月 19 日
the distance should be a column or row matrix. it should give initial distance Zero. lat long 5 55 6 60 7 65 . . . . .lat(n) long(n)
distance of each point from initial points using,dist= sqrt((x-x0)^2 + (y-y0)^2)); here x0&y0 are constant other terms changing..

回答 (1 件)

Jos (10584)
Jos (10584) 2014 年 2 月 19 日
From each point to all other points, resulting in N*(N-1) distances? Take a look at PDIST.

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by