squareNeighbors2 edit page

return the neighbor ids in a square grid

Syntax

ind = squareNeighbors2(RowsCols,Nid)