I have an integer array:
a=[3,4,5,6,7];
I want to convert it to a binary array with four bits each. For the above integer array I would lik
A late answer I know, but MATLAB has a function to do this directly de2bi
de2bi
out = de2bi([3,4,5,6,7], 4, 'left-msb');