필터 지우기
필터 지우기

Getting distance of centroids from each other.

조회 수: 5 (최근 30일)
Sean Ivan Roxas
Sean Ivan Roxas 2022년 4월 9일
댓글: Sean Ivan Roxas 2022년 4월 10일
Is it possible to get the distances between each centroid? For example I have 5 centroids (centroid 1 - 5) in an image and I would like to get the distance between centroid 1 and centroid 2, then centroid 1 and centroid 3, then centroid 1 and centroid 4, then centroid 1 and centroid 5, then for centroid 2 and centroid 3, and so on. Then I will store these distances in an adjacency list or an adjacency matrix so that I could create a graph network.

채택된 답변

Walter Roberson
Walter Roberson 2022년 4월 9일
use pdist()
  댓글 수: 5
Walter Roberson
Walter Roberson 2022년 4월 9일
G = graph(distances)
Sean Ivan Roxas
Sean Ivan Roxas 2022년 4월 10일
Is it possible to use graphtraverse or dfsearch to calculate for the effective resistance of the graph?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by