title: MATLAB Use contains function within an IF statement
body: <p>I have a cell array, strings of months in MATLAB.  I am using the contains() function to determine if 'Ju' is in the string, along with an if statement, and if the statement is true, then delete 'Ju.'  But I am getting an error.
  The error is:
  Undefined function or variable 'a'.</p>
  
  <p>Error in Untitled (line 4)
  if a == contains(months, pattern)</p>
  
  <pre><code>pattern = 'Ju';
  months = {'June', 'July', 'August', 'September'};
  
  if a == contains(months, pattern)
      a = regexprep(months, 'Ju', '')
  end
  </code></pre>