# how to convert the edge list (with node,node,weight) into weighted matrix

2 vues (au cours des 30 derniers jours)
Zhuo Zhou le 6 Mar 2019
refer to the title
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponses (1)

Pranjal Priyadarshi le 14 Mar 2019
To convert an adjacency list into an adjacency matrix in MATLAB we can use the “adjacency” function available in the library.
A= adjacency(G,'weighted') returns a weighted adjacency matrix, where for each edge (i,j), the value A(i,j) contains the weight of the edge. If the graph has no edge weights, then A(i,j) is set to 1. For this syntax, G must be a simple graph such that ismultigraph(G) returns false.
For a detailed explanation along with examples you can use the following documents:
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Graph and Network Algorithms dans Help Center et File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by