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.

Graph adjacency matrix

`A = adjacency(G)`

`A = adjacency(G,'weighted')`

`A = adjacency(G,weights)`

Edges with weight zero are not visible in the sparse adjacency matrix returned by

`adjacency`

. This means that a weighted adjacency matrix can represent a weighted graph only if there are no edges of weight zero.