I need to convert a Decimal Number to a Binary Vector
For example, Something like this:
length=de2bi(length_field,16);
Unfortunately, because of licensing, I cannot use this command. Is there any quick short technique for converting binary to a vector.
Here is what I am looking for,
If
Data=12;
Bin_Vec=Binary_To_Vector(Data,6) should return me
Bin_Vec=[0 0 1 1 0 0]
Thanks