how to connect nearest neighbor node between source node to destination node
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
singh
el 21 de Mayo de 2015
Comentada: sparsh garg
el 30 de Ag. de 2021
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150386/image.jpeg)
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 comentarios
Respuesta aceptada
Walter Roberson
el 21 de Mayo de 2015
3 comentarios
Walter Roberson
el 21 de Mayo de 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.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!