Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

A newbee to Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97170] A newbee to Mathematica
  • From: Nishant <voneur at gmail.com>
  • Date: Sat, 7 Mar 2009 02:37:52 -0500 (EST)

Hi I have just started using mathematica,and therefore have a very silly question that needs an answer.
I am trying to run this:
Needs["GraphUtilities`"]
Needs["Combinatorica`"]
am = {{1, 0, 1, 2, 0, 1, 2}, {0, 0, 0, 0, 1, 1, 1}, {1, 0, 0, 1, 1, 1,
     1}, {0, 3, 1, 4, 1, 0, 1}, {0, 1, 1, 1, 0, 1, 0}, {1, 1, 1, 0, 1,
     0, 0}, {1, 1, 5, 1, 0, 0, 0}};

MatrixForm[am]
g[FromAdjacencyMatrix[am, EdgeWeight], VertexLabeling -> True, 
 EdgeLabeling -> True]
GraphPlot3D[g]
I am getting this error message:
GraphPlot3D::grph:Graph:<11,7,Undirected> is not a valid graph. 

BASICALLY what I want to do is to generate a 3d graph from a given adjacency matrix,with the elements of the matrix showing the weights of each edge as is provided in FromAdjacencyMatrix[g,Edgeweight]

Thank you for helping me out


  • Prev by Date: Re: L-shaped ListContourPlot
  • Next by Date: Re: typsetting bug still present in Mathematica 7.01
  • Previous by thread: Re: Version problem with FindRoot
  • Next by thread: Re: A newbee to Mathematica