Mathematics    

Graphing Using Adjacency Matrices

The MATLAB gplot function creates a graph based on an adjacency matrix and a related array of coordinates. To try gplot, create the adjacency matrix shown above by entering

The columns of gplot's coordinate array contain the Cartesian coordinates for the corresponding node. For the diamond example, create the array by entering

This places the first node at location (1,3), the second at location (2,1), the third at location (3,3), and the fourth at location (2,5). To view the resulting graph, enter


  Introduction to Adjacency Matrices The Bucky Ball