\section{ONES Array of Ones}

\subsection{Usage}

Creates an array of ones of the specified size.  Two seperate 
syntaxes are possible.  The first syntax specifies the array 
dimensions as a sequence of scalar dimensions:
\begin{verbatim}
   y = ones(d1,d2,...,dn).
\end{verbatim}
The resulting array has the given dimensions, and is filled with
all ones.  The type of \verb|y| is \verb|float|, a 32-bit floating
point array.  To get arrays of other types, use the typecast 
functions (e.g., \verb|uint8|, \verb|int8|, etc.).
    
The second syntax specifies the array dimensions as a vector,
where each element in the vector specifies a dimension length:
\begin{verbatim}
   y = ones([d1,d2,...,dn]).
\end{verbatim}
This syntax is more convenient for calling \verb|ones| using a 
variable for the argument.  In both cases, specifying only one
dimension results in a square matrix output.
\subsection{Example}

The following examples demonstrate generation of some arrays of ones
using the first form.
\begin{verbatim}
--> ones(2,3,2)

ans = 

(:,:,1) = 

 1 1 1 
 1 1 1 

(:,:,2) = 

 1 1 1 
 1 1 1 

--> ones(1,3)

ans = 

 1 1 1 


\end{verbatim}
The same expressions, using the second form.
\begin{verbatim}
--> ones([2,6])

ans = 

 1 1 1 1 1 1 
 1 1 1 1 1 1 

--> ones([1,3])

ans = 

 1 1 1 


\end{verbatim}
Finally, an example of using the type casting function \verb|uint16| to generate an array of 16-bit unsigned integers with a value of 1.
\begin{verbatim}
--> uint16(ones(3))

ans = 

 1 1 1 
 1 1 1 
 1 1 1 


\end{verbatim}
