How to convert it into decimal in matlab?
Reply With Quote View Profile Advertising 05-01-10 22:55 #2 JoannesPaulus Advanced Member level 2 Join Date Mar 2008 Location USA Posts 597 Helped 123 / 123 Points 5,711 Level 17 Re: Matlab: Convert a signed binary vector into signed integ Not very straightforward: Code: b=’101′; if(b(1)==0) d=bin2dec(b(2:3)); else d=bin2dec(b(2:3))-3; end basically, if the MSB is 1 you have a negative number (2’s complement in the example).