function resize

Resizes X to the new axis lengths. The argument NAXIS3 is optional. If the new dimension is smaller than in X, the image will be clipped, else the image will be in the lower left corner.

Syntax
result = resize(X, NAXIS1, NAXIS2 [, NAXIS3])

Arguments
X:   A matrix.
NAXIS1:   The new length in the first dimension.
NAXIS2:   The new length in the second dimension.
NAXIS3:   The new length in the third dimension.