Neural Network Toolbox | Search  Help Desk |
hextop | Examples See Also |
Hexagonal layer topology function
pos = hextop(dim1,dim2,...,dimN)
hextop calculates the neuron positions for layers whose neurons are arranged in a N
dimensional hexagonal pattern.
hextop(dim1,dim2,...,dimN)
takes N
arguments,
dimi -
Length of layer in dimension i
.
N
x S
matrix of N
coordinate vectors where S
is the product of dim1
*dim2
*...
*dimN
.
This code creates and displays a two-dimensional layer with 40 neurons arranged in a 8x5 hexagonal pattern.
pos = hextop(8,5); plotsom(pos)This code plots the connections between the same neurons, but shows each neuron at the location of its weight vector. The weights are generated randomly so that the layer is very disorganized, as is evident in the following plot.
W = rands(40,2); plotsom(W,dist(pos))
gridtop
,
randtop