I need to convert a Decimal Number to a Binary Vector
For example, Something like this:
length=de2bi(length_field,16);
Unfortunat
A single call to Matlab's built-in function dec2bin can achieve this:
dec2bin
binVec = dec2bin(data, nBits)-'0'