Azzera filtri
Azzera filtri

how to find nearest node in random wireless sensor network for 100 nodes 100*100 area...plz help

1 visualizzazione (ultimi 30 giorni)
in a random sensor network 100 nodes are there.. how to find nearest node for n1, nearest node for n2....provided if n10 is the nearest node of n1 then it never bea again nearest of any other...plz help me

Risposte (1)

Walter Roberson
Walter Roberson il 31 Gen 2014
Find the distance from each node to every other node, and sort() the result recording the indices (the two-output version of sort). Be careful about the distance of nodes to themselves.
Yes, there are probably more efficient methods. Or at least methods that use less memory. In particular... http://www.mathworks.com/help/matlab/ref/voronoi.html -- though at the moment I do not see any convenient routine to determine which voronoi cell a particular point is in.

Categorie

Scopri di più su Voronoi Diagram in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by