This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# CrossMatrix

 CrossMatrix[r]gives a matrix whose elements are in a centered cross-shaped region that extends r positions along each index direction, and are otherwise. CrossMatrixgives a ww matrix containing a cross-shaped region of s. CrossMatrixyields an array whose elements are in a centered cross-shaped region that extends positions in the i index direction.
• The cross of s is always at the center of the region.
• CrossMatrix[All, w] gives a ww matrix containing a cross shape that is as large as possible.
• CrossMatrix[All, {w1, ..., wn}] gives a ... array containing a cross-shaped region that is as large as possible.
• Elements of CrossMatrix[r] are if their edit distance from the center is not more than 1.
• The parameter r need not be an integer; in an odd-dimensional array, the cross extends Floor[Abs[r+1/2]] pixels from the origin.
• The lines of the cross have width 1 if the corresponding dimension is odd and width 2 otherwise.
This computes and plots a cross matrix:
This computes and plots a cross matrix:
 Out[1]=
 Scope   (5)
Create a rectangular cross matrix:
Specify the matrix size:
Extend the cross to the boundaries of the matrix:
Automatically choose an odd width to just fit the cross:
Extend the cross to the given width and automatically choose the height:
New in 7