Borrar filtros
Borrar filtros

Find diameter of a spanning tree

1 visualización (últimos 30 días)
John Agkali
John Agkali el 17 de Nov. de 2014
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

Respuestas (0)

Categorías

Más información sobre Graph and Network Algorithms en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by