squareNeighbors edit page

return the neighbor ids in a square grid

Syntax

ind = squareNeighbors(RowsCols,Nid,varargin)