Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to convert it into decimal in matlab?

convert decimal MATLAB
0
Posted

How to convert it into decimal in matlab?

0

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).

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123