how to connect nearest neighbor node between source node to destination node

4 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Walter Roberson
Walter Roberson il 21 Mag 2015
  3 Commenti
Walter Roberson
Walter Roberson il 21 Mag 2015
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.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by