MATLAB: Integer to binary conversion

binarycommunicationMATLAB Compilersignal processing

how to convert the random integers into binary form for the multidimensional matrix of size m x n x p .

Best Answer

cast() to the smallest integer type guaranteed to be able to represent the signed value range you need. typecast to the unsigned integer of the same size. dec2bin to get binary coded as characters. Subtract '0' to get binary numeric.
Instead of dec2bin and subtract, you might be able use de2bi