Distance between two position vectors
d = boxdist(pos)
boxdist is a layer distance function that is used to find the distances
between the layer’s neurons, given their positions.
d = boxdist(pos) takes one argument,
and returns the
S matrix of distances.
boxdist is most commonly used with layers whose topology function is
Here you define a random matrix of positions for 10 neurons arranged in three-dimensional space and then find their distances.
pos = rand(3,10); d = boxdist(pos)
To change a network so that a layer’s topology uses
In either case, call
sim to simulate the network with
The box distance
D between two position vectors
Pj from a set of
S vectors is
Dij = max(abs(Pi-Pj))
Introduced before R2006a