NetLogo: how to read the adjacency matrix and create an appropriate graph?

I have an adjacency matrix like

        [0 1]
        [1 0]

it will draw a line with two nodes but as the matrix gets bigger and bigger there will be many combinations like

        [0 1 1]          [0 1 0]
        [1 0 0]    or    [1 0 1]
        [1 0 0]          [0 1 0]

How to read such a matrix and use it to create turtles and links for the graph described by the matrix?

+3
source share
1 answer

The NW extension has an nw: load-matrix primitive that handles this for you.

Please note that (as of February 2014) the extension is not related to NetLogo; You need to download and install it.

+3
source

All Articles