Creating Matrices from Network Diagrams