MATLAB: Generating adjacency matrix for an un-directed graph

adjacency matrixundirected graph

I need to generate an adjacency matrix for an un-directed graph. I m new to matlab can someone help

Best Answer

Are you using a graph object? If so, call adjacency on it. If instead you just have a list of edges, take a look at the functions sparse or accumarray.
Related Question