num2bin
Convert number to binary representation using quantizer
object
Syntax
Description
converts the numeric array y = num2bin(q,x)x into a binary character vector returned in
y using the data type properties specified by the
quantizer object q.
If x is a cell array containing numeric matrices, then
y will be a cell array of the same dimension containing binary
strings. If x is a structure, then each numeric field of
x is converted to binary.
[y1,y2,…] =
num2bin(q,x1,x2,…) converts the
numeric matrices x1, x2, … to binary strings
y1, y2, ….
Examples
Input Arguments
Tips
num2binandbin2numare inverses of one another. Note thatnum2binalways returns the binary representations in a column.
Algorithms
The fixed-point binary representation is two's complement.
The floating-point binary representation is in IEEE® Standard 754 style.
Version History
Introduced before R2006a