Pre-allocating a block of memory for holding a non-double matrix is memory efficient. While allocating blocks of memory for a matrix, zeros are pre-allocated to a matrix.
The functions to pre allocate memory is int8(), example matrix =int8(zeros(100));
Repmat function is used to create a single double matrix, example matrix2=repmat(int8(0), 100, 100)