1
$\begingroup$

I want to get the adjacency matrix of an in-built graph, say the dodecahedral graph. Naively using

AdjacencyMatrix[Dodecahedral]

doesn't give it to me. Any other way to get it?

$\endgroup$
  • 1
    $\begingroup$ Dodecahedral is a symbol, not a graph. You want this: d = GraphData["DodecahedralGraph"]; AdjacencyMatrix[d], I think. $\endgroup$ – acl Apr 27 '15 at 20:01
3
$\begingroup$
am1 = GraphData["DodecahedralGraph", "AdjacencyMatrix"];

or

am2 = AdjacencyMatrix[GraphData["DodecahedralGraph"]];

am1 == am2
(* True *)

MatrixPlot[am1]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.