From: woiya on 12 May 2010 20:36 Hey I'm new with MATLAB so bear with me please. I was supposed to create a network of 25 nodes and I thought of using the function graphminspantree. I created the distance matrix for every node to each other. However, the tree looks exactly the same every time I change the node R which supposed to change the root of the tree. Did I do something wrong? this is how I call the function: [ST,pred] = graphminspantree(UG,14,'Method','Kruskal'); But it still starts from node 1 in the final answer. Also in the help section it says that: When the graph is unconnected, Prim's algorithm returns only the tree that contains R, while Kruskal's algorithm returns an MST for every component. Since I created the distance matrix for every node to each other, does it mean that the graph is all connected? If so, how do i unconnect the graph but still maintaining it as a possible path? Thanks in advance!
|
Pages: 1 Prev: How to export matlab variable in fortran f10.3 format? Next: I do need your help |