Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Build graph from incidency matrix' topicStudent Support Forum > General > "Build graph from incidency matrix"

Next Comment >Help | Reply To Topic
Author Comment/Response
Anton
10/26/12 09:46am

Hi,
I'm looking for help trying to build a graph object in Mathematica, but getting the following error message:

a={{0,1,1,0,0,0,1,0,0},{1,0,1,0,1,0,0,1,0},{1,1,0,0,0,1,0,0,1},{0,0,0,0,0,1,0,0,0},{0,1,0,0,0,1,0,1,0},{0,0,1,1,1,0,0,0,1},{1,0,0,0,0,0,0,1,1},{0,1,0,0,1,0,1,0,1},{0,0,1,0,0,1,1,1,0}}
Out[52]= {{0,1,1,0,0,0,1,0,0},{1,0,1,0,1,0,0,1,0},{1,1,0,0,0,1,0,0,1},{0,0,0,0,0,1,0,0,0},{0,1,0,0,0,1,0,1,0},{0,0,1,1,1,0,0,0,1},{1,0,0,0,0,0,0,1,1},{0,1,0,0,1,0,1,0,1},{0,0,1,0,0,1,1,1,0}}
In[53]:= Head[a]
Out[53]= List
In[54]:= IncidenceGraph[a]
During evaluation of In[54]:= IncidenceGraph::list: List expected at position 1 in IncidenceGraph[Automatic,{{0,1,1,0,0,0,1,0,0},{1,0,1,0,1,0,0,1,0},{1,1,0,0,0,1,0,0,1},{0,0,0,0,0,1,0,0,0},{0,1,0,0,0,1,0,1,0},{0,0,1,1,1,0,0,0,1},{1,0,0,0,0,0,0,1,1},{0,1,0,0,1,0,1,0,1},{0,0,1,0,0,1,1,1,0}}]. >>
Out[54]= IncidenceGraph[Automatic,{{0,1,1,0,0,0,1,0,0},{1,0,1,0,1,0,0,1,0},{1,1,0,0,0,1,0,0,1},{0,0,0,0,0,1,0,0,0},{0,1,0,0,0,1,0,1,0},{0,0,1,1,1,0,0,0,1},{1,0,0,0,0,0,0,1,1},{0,1,0,0,1,0,1,0,1},{0,0,1,0,0,1,1,1,0}}]


URL: ,

Subject (listing for 'Build graph from incidency matrix')
Author Date Posted
Build graph from incidency matrix Anton 10/26/12 09:46am
Re: Build graph from incidency matrix Peter Pein 11/01/12 4:51pm
Re: Build graph from incidency matrix Anton 11/08/12 05:18am
Next Comment >Help | Reply To Topic