subgraph from graph matlab function

1 view (last 30 days)
Hassan
Hassan on 29 Oct 2012
if i have a graph such as
WW = [20 10 12 14 12 10 20];
from=[1 2 2 3 4 3 5];
to = [4 1 4 2 3 5 4];
DG = sparse(from,to,WW); UG = tril(DG + DG');
d=graphallshortestpaths(UG,'directed',false);
is there any method to take subgraph for example(graph that contain only nodes 1 3 5)
thanks in advance
hassan

Answers (0)

Categories

Find more on Graph and Network Algorithms in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!