| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Neural Network Toolbox |
| Contents | Index |
Distance between two position vectors
boxdist is a layer distance function that is used to find the distances between the layer's neurons, given their positions.
boxdist(pos) takes one argument,
| pos |
N x S matrix of neuron positions |
and returns the S x S matrix of distances.
boxdist is most commonly used with layers whose topology function is gridtop.
Here you define a random matrix of positions for 10 neurons arranged in three-dimensional space and then find their distances.
You can create a standard network that uses boxdist as a distance function by calling newsom.
To change a network so that a layer's topology uses boxdist, set net.layers{i}.distanceFcn to 'boxdist'.
In either case, call sim to simulate the network with boxdist. See newsom for training and adaption examples.
The box distance D between two position vectors Pi and Pj from a set of S vectors is
| Provide feedback about this page |
![]() | adapt | calcgx | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |