The REPLACE (or replace) command takes three arguments; either a matrix, a
list of two indices, and another matrix, or a vector, a single index,
and another vector.
REPLACE returns the first matrix (or vector) with the second
matrix (or vector) placed at the location given by the indices,
replacing the elements previously there. The second matrix (or
vector) will be shrunk, if necessary, so that it fits in the first
matrix (or vector).
Input:
Output:
Input:
Output:
Input:
Output:
Input:
Output: