BoxMatrix

BoxMatrix[r]

gives a × matrix of s.

BoxMatrix[r,w]

gives a × block of s centered in a w×w matrix of s.

BoxMatrix[{r1,r2,},]

gives a array of s.

Details

  • BoxMatrix[r] gives a square pattern of s extending r positions from the center.
  • The parameter r need not be an integer; elements are if their chessboard distance from the center is not more than |r+1/2|.
  • BoxMatrix[All,w] gives a w×w matrix containing a box shape that is as large as possible.
  • BoxMatrix[,{w1,w2,}] gives a w1×w2× array.
  • BoxMatrix[{r1,,rn},w] gives a w××w array.
  • BoxMatrix[All,{w1,,wn}] gives a w1××wn array containing a box-shaped region that is as large as possible.

Examples

open allclose all

Basic Examples  (1)

This computes and plots a box:

In[1]:=
Click for copyable input
Out[1]=

Scope  (4)

Neat Examples  (1)

See Also

ConstantArray  CenterArray  DiamondMatrix  CrossMatrix  DiskMatrix  CornerNeighbors  ListConvolve  ImageConvolve

Introduced in 2008
(7.0)