Hi guys,
How to make a connection between random nodes and select 1 of them as a cluster head?
numNodes=10;p = rand(numNodes,2); labels = cellstr( num2str([1:numNodes]') );plot(p(:,1),p(:,2),'rx')text(p(:,1), p(:,2), labels, 'VerticalAlignment','bottom', ... 'HorizontalAlignment','right')
The figure
Best Answer