title: How to display the differing elements in two string arrays in a loop?
body: <p>I have two string arrays - <code>f</code> and <code>g</code>. I want the program to print the members of <code>g</code> that do not exist in <code>f</code>.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>% &lt;for ... &gt;
    % &lt;get `f` and `g` as inputs&gt;
    ...
    x = 0;
    y = 0;
    while x &lt; a
      while y &lt; b
        w = string(f);
        z = string(g);
        tf = strcmp(w,z);
        for tf == 0 %         &lt; &lt; &lt; &lt; &lt; Help needed with this
          fprintf('%s\n',z)
        end
        y = y+1;
      end
      x = x+1;
    end
  % end
  </code></pre>
  
  <p>The result I get for <code>tf</code> looks like <code>1 0 0</code>. What I want is for the <code>fprintf</code> to display the entries that correspond to <code>0</code>'s in <code>z</code> (to display the differing members of <code>w</code> and <code>z</code>), how do I do that?</p>