\section{COMPLEX Convert to 32-bit Complex Floating Point}

\subsection{Usage}

Converts the argument to a 32-bit complex floating point number.  The syntax
for its use is
\begin{verbatim}
   y = complex(x)
\end{verbatim}
where \verb|x| is an \verb|n|-dimensional numerical array.  Conversion follows the general C rules.  Note that both \verb|NaN| and \verb|Inf| in the real and imaginary parts are both preserved under type conversion.
\subsection{Example}

The following piece of code demonstrates several uses of \verb|complex|.  First, we convert from an integer (the argument is an integer because no decimal is present):
\begin{verbatim}
--> complex(200)
ans = 
  <complex>  - size: [1 1]
  200+   0 i  

\end{verbatim}
In the next example, a double precision argument is passed in (the presence of a decimal without the \verb|f| suffix implies double precision).
\begin{verbatim}
--> complex(400.0)
ans = 
  <complex>  - size: [1 1]
  400+   0 i  

\end{verbatim}
In the next example, a dcomplex argument is passed in. 
\begin{verbatim}
--> complex(3.0+4.0*i)
ans = 
  <complex>  - size: [1 1]
  3+ 4 i  

\end{verbatim}
In the next example, a string argument is passed in.  The string argument is converted into an integer array corresponding to the ASCII values of each character.
\begin{verbatim}
--> complex('he')
ans = 
  <complex>  - size: [1 2]
 
Columns 1 to 2
  104+   0 i   101+   0 i  

\end{verbatim}
In the next example, the \verb|NaN| argument is converted.
\begin{verbatim}
--> complex(nan)
ans = 
  <complex>  - size: [1 1]
  nan+   0 i  

\end{verbatim}
In the last example, a cell-array is passed in.  For cell-arrays and structure arrays, the result is an error.
\begin{verbatim}
--> complex({4})
Error: Cannot convert cell-arrays to any other type.

\end{verbatim}
