\section{INT2BIN Convert Integer Arrays to Binary}

\subsection{Usage}

Computes the binary decomposition of an integer array to the specified
number of bits.  The general syntax for its use is
\begin{verbatim}
   y = int2bin(x,n)
\end{verbatim}
where \verb|x| is a multi-dimensional integer array, and \verb|n| is the number
of bits to expand it to.  The output array \verb|y| has one extra dimension
to it than the input.  The bits are expanded along this extra dimension.
\subsection{Example}

The following piece of code demonstrates various uses of the int2bin
function.  First the simplest example:
\begin{verbatim}
--> A = [2;5;6;2]
A = 
  <int32>  - size: [4 1]
 
Columns 1 to 1
 2  
 5  
 6  
 2  
--> int2bin(A,8)
ans = 
  <logical>  - size: [4 8]
 
Columns 1 to 8
 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 = 
  <int32>  - size: [4 1]
 
Columns 1 to 1
  1  
  2  
 -5  
  2  
--> int2bin(A,8)
ans = 
  <logical>  - size: [4 8]
 
Columns 1 to 8
 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  

\end{verbatim}
