필터 지우기
필터 지우기

Extract the upper and the lower half of an integer

조회 수: 15 (최근 30일)
suzi freunden
suzi freunden 2012년 6월 1일
Hi, is there a function that extract the upper half of an integer (most significants bits) and the lower half? Thanks

답변 (2개)

per isakson
per isakson 2012년 6월 1일
See: bitget
C = bitget(A, bit) returns the value of the bit at position bit in A.

Walter Roberson
Walter Roberson 2012년 6월 1일
For anything other than 8 bit integers, typecast() the integer into the unsigned integer type which is half of the size. You may have to deal with byte order problems, though.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by