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

# DiskMatrix

 DiskMatrix[r] gives a matrix whose elements are in a disk-shaped region of radius r, and are otherwise . DiskMatrixgives a w×w matrix containing a disk of s with radius r. DiskMatrixyields an array whose elements are in an ellipsoidal region with semiaxis in the i index direction.
• The disk of s is always at the center of the region.
• In DiskMatrix[r] or DiskMatrix the matrix or array is sized so as to just include all nonzero elements.
• The disk-like region is taken to be the best discrete approximation to a circular disk possible given the size of the matrix.
• DiskMatrix[All, w] gives a w×w matrix containing a disk that is as large as possible.
• DiskMatrix[All, {w1, ..., wn}] gives a array containing an ellipsoid that is as large as possible.
• The radius r need not be an integer; in general elements are if their distance from the center is not more than .
This computes and plots a square disk-shaped matrix of radius 7:
This computes and plots a square disk-shaped matrix of radius 7:
 Out[1]=
 Scope   (1)
Create a rectangular ellipse-shaped matrix:
Put a disk inside a bigger matrix:
Extend the disk to the boundaries of the matrix:
Automatically choose an odd width to just fit the disk:
Extend the disk to the given width, and automatically choose the height:
New in 7