Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news1.google.com!news.glorb.com!tr22g12.aset.psu.edu!news.mathforum.org!not-for-mail
From: =?UTF-8?Q?Adam_=C5=98=C3=ADmsk=C3=BD?= <adamrimsky@seznam.cz>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Graph theory, allshortestpaths, show parts of the path
Date: Thu, 19 Nov 2009 07:53:37 EST
Organization: The Math Forum
Lines: 9
Message-ID: <187437644.2384.1258635247464.JavaMail.root@gallium.mathforum.org>
References: <hd1ik1$r2n$1@fred.mathworks.com>
NNTP-Posting-Host: gallium.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1258635247 28407 144.118.94.39 (19 Nov 2009 12:54:07 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Thu, 19 Nov 2009 12:54:07 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:586389


Thank you very much Lucio for your help. I was last week out so I can replay till today. Your answer is very usefull but could you help me in one last thing? In your last answer you wrote that iam asking for cumulative edge length but, perhaps I dont understand to your answer enough, I need to know all shortest paths from source node, for example 1 to all other nodes from node 2 to all other ... which will be showed in sequenc of nodes between them. As you wrote:

you get all shortest paths from node 1 to all other nodes
if you want the path form node 1 to node 3 you can do:
[pred(pred(3)) pred(3) 3]
ans =
1 5 3

and these results is what I need. This sequenc for all paths (1 to 2,3,4; 2to 1,2,3;...). Is there any possibility how to iterate this procedure for all nodes? Once more thank you very much for any help