From: Amina on
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.