Section: Type Conversion Functions
y = int2bin(x,n)
where x
is a multi-dimensional integer array, and n
is the number
of bits to expand it to. The output array y
has one extra dimension
to it than the input. The bits are expanded along this extra dimension.
--> A = [2;5;6;2] A = 2 5 6 2 --> int2bin(A,8) ans = 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 --> A = [1;2;-5;2] A = 1 2 -5 2 --> int2bin(A,8) ans = 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 1 0