Categories
Matlab Question and answers

Explain the process to pre-allocate a non-double Matrix

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));

The repmat function is used to create a single double matrix, example matrix2=repmat(int8(0), 100, 100)

Leave a Reply

Your email address will not be published. Required fields are marked *