"hend " <
eng.h...@yahoo.com> wrote in message <jbab7h$47b$
1...@newscl01ah.mathworks.com>...
> Hello everybody;
>
> i'm in need to a program code which can convert negative fractions into binary form ( any form ) ..
> dec2bin command is not helpful in this case !
You can take advantage of the fact that Java is installed along with ur MATLAB. if u know basic Java, then u can do work around it.
For example to convert -5 to binary.... at the command prompt, type:
java.lang.Integer.toBinaryString(-5)
if ur Java is good enough , u will be able to find a way to handle the negative fraction and the number of bits been displayed.
Optionally, write a MATLAB program to handle what u want to do, and post it to the file exchange...... lol