dec2bin — binary representation
[str]=dec2bin(x[,n])
scalar/vector/matrix of positives integers
a positive integer
a string or a vector of string
Given x
, a positive (or a vector/matix of
integers) integer, this function returns a string (or a column vector of
strings) which is the binary representation of x.
If
dimension of x
is superior than 1 then each component
of the colums vector str
is the binary representation
of the x
components (i.e str(i)
is
the binary representation of x(i)
). If the components
length of str
is less than n
( i.e
length str(i) < n ), then add to str
components the
characters '0' on the left in order to have componants length equal to
n.