how to connect nearest neighbor node between source node to destination node
4 次查看(过去 30 天)
显示 更早的评论
N=20;
area=100;
XX=area/2;
YY=area/2;
bs=[XX,YY];
X=rand(1,N)*area;
Y=rand(1,N)*area;
plot(XX,YY,':o','LineWidth',3,'MarkerEdgeColor','k','MarkerFaceColor',[0.5,0.5,0.5],'MarkerSize',15);
text(XX,YY,'BS');
hold on;
xlabel('X');
ylabel('Y');
X1=([X;Y])';
grid on;
for i=1:N
plot(X(i),Y(i));
text(X(i),Y(i),num2str(i),'fontsize',15);
end
now i wish to connect node 14 to 9 through nearest neighbor nodes
node 14 is source node connect with nearest node in direction destination node(9)
firstly 14 connect with 10
then 10 connect with 11
then 11 connect with BS
then BS connect with node 9
0 个评论
采纳的回答
Walter Roberson
2015-5-21
3 个评论
Walter Roberson
2015-5-21
singh please buy me a license for the Bioinformatics Toolbox so I can run that routine. My license is the Commercial / Professional license, so the price is only $US1000 for the toolbox. As my software maintenance has expired, it might be necessary to also buy a year of software maintenance at about $US325 as Mathworks will only allow toolboxes to be added to licenses that are at most one year (two years?) out of service. For sure the price will not exceed $US1500 so that I can run this code for you.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!