\section{ALL All True Function}

\subsection{Usage}

Reduces a logical array along a given dimension by testing for all
logical 1s.  The general 
syntax for its use is
\begin{verbatim}
  y = all(x,d)
\end{verbatim}
where \verb|x| is an \verb|n|-dimensions array of \verb|logical| type.
The output is of \verb|logical| type.  The argument \verb|d| is 
optional, and denotes the dimension along which to operate.
The output \verb|y| is the same size as \verb|x|, except that it is 
singular along the operated direction.  So, for example,
if \verb|x| is a \verb|3 x 3 x 4| array, and we \verb|all| operation along
dimension \verb|d=2|, then the output is of size \verb|3 x 1 x 4|.
\subsection{Function Internals}

The output is computed via
\[
y(m_1,\ldots,m_{d-1},1,m_{d+1},\ldots,m_{p}) = 
\min_{k} x(m_1,\ldots,m_{d-1},k,m_{d+1},\ldots,m_{p})
\]
If \verb|d| is omitted, then the minimum is taken over all elements of
\verb|x|.
\subsection{Example}

The following piece of code demonstrates various uses of the \verb|all|
function
\begin{verbatim}
--> A = [1,0,0;1,0,0;0,0,1]
A = 
  <int32>  - size: [3 3]
 
Columns 1 to 3
 1  0  0  
 1  0  0  
 0  0  1  

\end{verbatim}
We start by calling \verb|all| without a dimension argument, in which 
case it defaults to testing all values of \verb|A|
\begin{verbatim}
--> all(A)
ans = 
  <logical>  - size: [1 1]
 0  

\end{verbatim}
The \verb|all| function is useful in expressions also.
\begin{verbatim}
--> all(A>=0)
ans = 
  <logical>  - size: [1 1]
 1  

\end{verbatim}
Next, we apply the \verb|all| operation along the rows.
\begin{verbatim}
--> all(A,2)
ans = 
  <int32>  - size: [3 3]
 
Columns 1 to 3
 1  0  0  
 1  0  0  
 0  0  1  

\end{verbatim}
