title: How to remove empty strings from a MATLAB array of structs
body: <p>I have a MATLAB array of structs with a field called <code>image_name</code>. There are a few entries where </p>
  
  <pre><code>x(n).image_name = []
  </code></pre>
  
  <p>(i.e., the nth row of the struct array has an <code>image_name</code> that's empty)</p>
  
  <p>I would like to remove them by trying something along the lines of</p>
  
  <pre><code>idx = [x.image_name] == []
  x(idx) = [];
  </code></pre>
  
  <p>but can't get the indices of the empty strings. Every variation I try generates an error.</p>
  
  <p>How can I find the row indices of the empty strings, so I can remove them?</p>