I am looking for a method that can convert a decimal number to binary vector. I know there are many answers that I can google it, but seems there's nothing fits my problem.
I need to convert a decimal number (can be both positive or negative, and has a long string after decimal point) into binary. And at some point, I have to convert the binary strings back to decimal numbers.
I've found a function ?dec2bin?, but seems it just convert the integer part, for instance, the result of dec2bin(1.87) is 1.
May I know if there's any functions that can help me?