필터 지우기
필터 지우기

Find diameter of a spanning tree

조회 수: 1 (최근 30일)
John Agkali
John Agkali 2014년 11월 17일
hello, I have a weighted undirected minimum spanning tree and I want to find the find the diameter of this. I know that diameter is the longest shortest path but I haven't understood what parameters do i have to fill in the function graphshortestpath() in order to find the shortest path. Let's assume that my spanning tree have 23 indices. So do I need to fill these parameters ...
[dist,path,pred]=graphshortestpath(ST1,1,23,'Directed',false)
ST1 is a sparse matrix that represents the minimum spanning tree.And after the calculations do I have to retrieve the maximum dist in order to find the longest shortest path?
thanks in advance

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by