how can i calculate the degree of node?
1 次查看(过去 30 天)
显示 更早的评论
how can i calculate the degree of node?
want to wait until i have calculated the degree for every node and then once that has been completed, find that node with the maximum degree and minimum distance to the sink. and plot the node
if (d<(handles.r))&&(i~=j)
degree(i)=degree(i)+1;% CALCULE LEs nombre de neighbord( DEGRE) DES NOEUDS REDONDANTS
disp(degree(i))
if (max(degree))%&&(min(handles.d_sink))
plot([X1,X2],[Y1,Y2],'o','LineWidth',0.1);
grid on;
end
end
plzzzzz need help
0 个评论
回答(1 个)
Steven Lord
2015-11-8
Are you using one of the graph or digraph objects introduced in release R2015b? If so look at the DEGREE (for graph) or INDEGREE/OUTDEGREE (for digraph) functions listed on that documentation page.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!