MATLAB: Convert weighted digraph to undirected

digraphdirectedgraphgraph theoryundirected

Is there any way of converting a weighted digraph to undirected?
eg. Node1-Node2-Weight A-B-1 B-A-1
Will become: A-B-2 ?

Best Answer

Take the adjacency matrix of the weighted digraph and add it to its transpose; build an undirected graph from the result.