Neighbours
neighbours(i, j, n, x)
i
row index
j
column index
n
number of neighbours (4 or 8)
x
matrix with values
Vector with values the neighours of x