I can't create a graph from the adjacency matrix

3 visualizaciones (últimos 30 días)
Emanuele Giacomuzzo
Emanuele Giacomuzzo el 24 de Nov. de 2020
Comentada: Emanuele Giacomuzzo el 25 de Nov. de 2020
Hi, I'm trying to create an undirected graph from my adjacency matrix. This is my code:
undirected_graph=graph(undirected_network);
The error I receive is the following one:
Error using digraph/subsref (line 8)
Unsupported graph indexing.
The adjacency matrix is symmetric (I tested it with the function issymmetric) and its diagonal values are all zero (the graph has no loops).

Respuesta aceptada

Steven Lord
Steven Lord el 24 de Nov. de 2020
I suspect you've created a digraph object and stored it in a variable named graph, which will prevent you from calling the graph function to create a graph object. Rename that variable.

Más respuestas (0)

Categorías

Más información sobre Undirected Graphs en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by