Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

two's complement of an integer in Matlab?

Status
Not open for further replies.

necratog

Electrical
Joined
Aug 10, 2005
Messages
2
Location
DE
Hello,
how do i get a two's complement of an integer in Matlab?
I want to get a 16 Bit two's complement vector of an integer.
It is not possible to use dec2binvec and adding a binary '1' afterwards. I get a '0001010001010102' as an example.
Does anybody know how it works?
Thanks a lot!

Greetings,
necratog
 
Why don't you check the help file?

TTFN



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top