graphshortestpath

  • Follow


Hi All

I am a new user of Matlab. I am using graphshortestpath function to find shortest paths between two nodes of my network.
I want to use 'Bellman Ford' for this purpose.
So i use:
[dist,path] = graphshortestpath(UG,4,7,'directed',false,'Method','Bellman-Ford')

Where 4 & 7 are source & destination nodes. The graph is undirected so false is next to 'directed'.
Method to be used is 'Bellman-Ford'.

But i don't get the desired result i-e even when i use without the 'Method' keyword the result is the same:
[dist,path] = graphshortestpath(UG,4,7,'directed',false)
Now in this case Dijkstra will be used because it is default method.

Can anybody please point out the mistake i am making here.
0
Reply hayatamina (3) 1/7/2010 10:50:26 AM


0 Replies
548 Views

(page loaded in 0.03 seconds)

Similiar Articles:






7/27/2012 2:24:06 PM


Reply: