\section{STRCMP String Compare Function}

\subsection{USAGE}

Compares two strings for equality.  The general
syntax for its use is
\begin{verbatim}
  p = strcmp(x,y)
\end{verbatim}
where \verb|x| and \verb|y| are two strings.  Returns \verb|true| if \verb|x|
and \verb|y| are the same size, and are equal (as strings).  Otherwise,
it returns \verb|false|.
In the second form, \verb|strcmp| can be applied to a cell array of
strings.  The syntax for this form is
\begin{verbatim}
  p = strcmp(cellstra,cellstrb)
\end{verbatim}
where \verb|cellstra| and \verb|cellstrb| are cell arrays of a strings
to compare.  Also, you can also supply a character matrix as
an argument to \verb|strcmp|, in which case it will be converted
via \verb|cellstr| (so that trailing spaces are removed), before being
compared.
\subsection{Example}

The following piece of code compares two strings:
\begin{verbatim}
--> x1 = 'astring';
--> x2 = 'bstring';
--> x3 = 'astring';
--> strcmp(x1,x2)
ans = 
  <logical>  - size: [1 1]
 0  
--> strcmp(x1,x3)
ans = 
  <logical>  - size: [1 1]
 1  

\end{verbatim}
Here we use a cell array strings
\begin{verbatim}
--> x = {'astring','bstring',43,'astring'}
x = 
  <cell array> - size: [1 4]
 
Columns 1 to 3
 astring    bstring    [43]    
 
Columns 4 to 4
 astring    
--> p = strcmp(x,'astring')
p = 
  <logical>  - size: [1 4]
 
Columns 1 to 4
 1  0  0  1  

\end{verbatim}
Here we compare two cell arrays of strings
\begin{verbatim}
--> strcmp({'this','is','a','pickle'},{'what','is','to','pickle'})
ans = 
  <logical>  - size: [1 4]
 
Columns 1 to 4
 0  1  0  1  

\end{verbatim}
Finally, the case where one of the arguments is a matrix
string
\begin{verbatim}
--> strcmp({'this','is','a','pickle'},['peter ';'piper ';'hated ';'pickle'])
ans = 
  <logical>  - size: [1 4]
 
Columns 1 to 4
 0  0  0  1  

\end{verbatim}
