Link distance function
d = linkdist(pos)
linkdist is a layer distance function used to find the distances between
the layer’s neurons given their positions.
d = linkdist(pos) takes one argument,
and returns the
S matrix of distances.
Here you define a random matrix of positions for 10 neurons arranged in three-dimensional space and find their distances.
pos = rand(3,10); D = linkdist(pos)
You can create a standard network that uses
linkdist as a distance
function by calling
To change a network so that a layer’s topology uses
In either case, call
sim to simulate the network with
The link distance
D between two position vectors
Pj from a set of
S vectors is
Dij = 0, if i == j = 1, if (sum((Pi-Pj).^2)).^0.5 is <= 1 = 2, if k exists, Dik = Dkj = 1 = 3, if k1, k2 exist, Dik1 = Dk1k2 = Dk2j = 1 = N, if k1..kN exist, Dik1 = Dk1k2 = ...= DkNj = 1 = S, if none of the above conditions apply