Method on @infsup: resize (X, M)
Method on @infsup: resize (X, M, N, ...)
Method on @infsup: resize (X, [M N, ...])

Resize interval array X cutting off elements as necessary.

In the result, element with certain indices is equal to the corresponding element of X if the indices are within the bounds of X; otherwise, the element is set to zero.

If only M is supplied, and it is a scalar, the dimension of the result is M-by-M. If M, N, ... are all scalars, then the dimensions of the result are M-by-N-by-.... If given a vector as input, then the dimensions of the result are given by the elements of that vector.

An object can be resized to more dimensions than it has; in such case the missing dimensions are assumed to be 1. Resizing an object to fewer dimensions is not possible.

resize (infsup (magic (3)), 4, 2)
  ⇒ ans = 4×2 interval matrix
     [8]   [1]
     [3]   [5]
     [4]   [9]
     [0]   [0]

See also: @infsup/reshape, @infsup/cat, @infsup/postpad, @infsup/prepad.

Package: interval