Re: A Question about adjacency matrix
- To: mathgroup at smc.vnet.net
- Subject: [mg104524] Re: A Question about adjacency matrix
- From: dh <dh at metrohm.com>
- Date: Tue, 3 Nov 2009 02:53:11 -0500 (EST)
- References: <hcl4be$c4d$1@smc.vnet.net>
Hi, Graphics3D is a geometric object. A graph on the other hand is a data structure (look up Graph in the help) describing connections (without a fixed geometry). AdjacencyMatrix[g] takes a graph object, not a 3D graphics. e.g.: Needs["Combinatorica`"] Needs["GraphUtilities`"] g = RandomGraph[4, 0.5, Directed]; ShowGraph[g, VertexNumber -> True] AdjacencyMatrix[g] // MatrixForm Daniel Marwa Abd El-Wahaab wrote: > Dear Sir, > > I am a teaching assistant in Faculty of Engineering in Mansoura University > Egypt. > > I am a Mathematica 7 user from about 4 months . > > I have a problem about the construction of adjacency matrix . > > My problem : > > I construct a graph by "Graphics3D" function & I need to get the adjacency > matrix to this graph . > > I tried this : > > Needs["Combinatorica`"] > ToAdjacencyMatrix[graph] > > but it doesn't give me the matrix. > > What should I do? > > I need your help. > > Thanks > > Marwa Ali > >