Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: getedgesbynodeid and graphshortestpath problem
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Poornima

Posts: 2
Registered: 7/22/13
getedgesbynodeid and graphshortestpath problem
Posted: Jul 25, 2013 11:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi all,
I am getting this error....
??? Error using ==> biograph.biograph.getedgesbynodeid at 62
When two input arguments are given, NODE_IDS (or PATH_IDS) must be a cell string.edges = getedgesbynodeid(h,get(h.Nodes(path),'ID'));

What am I supposed to do to get over this error, I am trying to color the shortest path.
The DIST, PATH visible in graphkshortestpaths function is not visible with graphshortestpath...

Please I need help.

The code snippet is ....
[DIST,PATH]= graphkshortestpaths( G, stnode, destnode, 2 );
h = view(biograph(G,[],'ShowArrows','Off','ShowWeights','off'));

%stnode is start node , destnode is the end node
[dist, path, pred] = graphshortestpath(G,stnode,destnode);
;
set(h.Nodes(path),'Color',[1 0.4 0.4]);
% fowEdges = getedgesbynodeid(h,get(h.Nodes(path),'ID'));
% revEdges = getedgesbynodeid(h,get(h.Nodes(fliplr(path)),'ID'));
% edges = [fowEdges;revEdges];
edges = getedgesbynodeid(h,get(h.Nodes(path),'ID'));
set(edges,'LineColor',[1 0 0])
set(edges,'LineWidth',1.5)

Thank you once again, please help.
Poornima



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.