Binary to Signed decimal in MATLAB
Ältere Kommentare anzeigen
Hello,
I have a 64x1 workspace variable,where each value is of 16 bits.
I need to convert each of them into signed decimal value, which would span the entire range of signed 16 bit numbers from -32768 to +32767.
I tried bin2dec() but it provides only an unsigned value.
Kindly help.
Akzeptierte Antwort
Weitere Antworten (2)
Titus Edelhofer
am 25 Mai 2012
Hi,
then I guess the other way round should do the trick as well:
typecast(uint16(bin2dec('1000000000000000')), 'int16')
Titus
Aparna
am 25 Mai 2012
0 Stimmen
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!