FUNCTION REFERENCE

bitget

Get a bit from each integer value.

Get a bit from each integer value.

Syntax

bitget(A, BIT); bitget(A, BIT, ASSUMEDTYPE)

Bits are numbered from 1 at the least significant bit. Equal-size arrays or scalar inputs are accepted. Integer inputs retain their class and all 64 bits. Double inputs must be integral and default to an assumed uint64 type; the optional assumed type selects an integer bit width.

Example

bitget(5, 1:4)   % [1 0 1 0]

Differences from MATLAB: none known.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.