\section{DCOMPLEX 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 = dcomplex(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|dcomplex|.  First, we convert from an integer (the argument is an integer because no decimal is present):
\begin{verbatim}
--> dcomplex(200)
ans = 
  <dcomplex>  - size: [1 1]
  200+   0i  

\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}
--> dcomplex(400.0)
ans = 
  <dcomplex>  - size: [1 1]
  400+   0i  

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

\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}
--> dcomplex('h')
ans = 
  <dcomplex>  - size: [1 1]
  104+   0i  

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

\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}
--> dcomplex({4})
Error: Cannot convert cell-arrays to any other type.

\end{verbatim}
