\section{SYSTEM Call an External Program}

\subsection{Usage}

The \verb|system| function allows you to call an external
program from within FreeMat, and capture the output.
The syntax of the \verb|system| function is
\begin{verbatim}
  y = system(cmd)
\end{verbatim}
where \verb|cmd| is the command to execute.  The return
array \verb|y| is of type \verb|cell-array|, where each entry
in the array corresponds to a line from the output.
\subsection{Example}

Here is an example of calling the \verb|ls| function (the
list files function under Un*x-like operating system).
\begin{verbatim}
--> y = system('ls m*.m')

y = 
  Empty array [0 1]
--> y{1}

\end{verbatim}
