Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Minimum spanning tree of graph

`T = minspantree(G)`

`T = minspantree(G,Name,Value)`

```
[T,pred]
= minspantree(___)
```

returns the minimum spanning tree,
`T`

= minspantree(`G`

)`T`

, for graph `G`

.

uses additional options specified by one or more Name-Value pair arguments. For
example, `T`

= minspantree(`G`

,`Name,Value`

)`minspantree(G,'Method','sparse')`

uses Kruskal’s
algorithm for calculating the minimum spanning tree.

Was this topic helpful?