Grid layer topology function
Syntax
pos = gridtop(dim1,dim2,...,dimN)
Description
gridtop
calculates neuron positions for layers whose neurons are arranged in an N
dimensional grid.
gridtop(dim1,dim2,...,dimN)
takes N
arguments,
and returns an N
x S
matrix of N
coordinate vectors where S
is the product of dim1
*dim2
*...
*dimN
.
Examples
This code creates and displays a two-dimensional layer with 40 neurons arranged in a 8x5 grid.
pos = gridtop(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 the layer is very disorganized as is evident in the following plot.
W = rands(40,2); plotsom(W,dist(pos))
See Also
hextop
,
randtop
[ Previous | Help Desk | Next ]