abbas mahmudi
abbas mahmudi

Reputation: 175

logical and between an image and a const value

i want write a code for bit plane slicing without using bitget() i want calculate logical and between an image and a const value such as 5 for get bit plane 5 What do I do?

Upvotes: 0

Views: 49

Answers (1)

Shai
Shai

Reputation: 114826

have you tried bitand?

fifthBit = bitand( I, 32 ) > 0; % assuming I is an integer type

Upvotes: 1

Related Questions