\section{BIN2INT Convert Binary Arrays to Integer}

\subsection{Usage}

Converts the binary decomposition of an integer array back
to an integer array.  The general syntax for its use is
\begin{verbatim}
   y = bin2int(x)
\end{verbatim}
where \verb|x| is a multi-dimensional logical array, where the last
dimension indexes the bit planes (see \verb|int2bin| for an example).
By default, the output of \verb|bin2int| is unsigned \verb|uint32|.  To
get a signed integer, it must be typecast correctly.
\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  
--> B = int2bin(A,8)
B = 
  <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  
--> bin2int(B)
ans = 
  <uint32>  - size: [4 1]
 
Columns 1 to 1
 2  
 5  
 6  
 2  
--> A = [1;2;-5;2]
A = 
  <int32>  - size: [4 1]
 
Columns 1 to 1
  1  
  2  
 -5  
  2  
--> B = int2bin(A,8)
B = 
  <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  
--> bin2int(B)
ans = 
  <uint32>  - size: [4 1]
 
Columns 1 to 1
   1  
   2  
 251  
   2  
--> int32(bin2int(B))
ans = 
  <int32>  - size: [4 1]
 
Columns 1 to 1
   1  
   2  
 251  
   2  

\end{verbatim}
