title: How to close all neural network diagrams in MATLAB?
body: <p>I need to show diagrams of some networks, but the problem is that <code>close all</code> doesn't close these windows, so I have several windows to close manually after a few runs.</p>
  
  <pre><code>[x,t] = house_dataset;
  net1 = newff(x, t, [5, 3]);
  view(net1);
  net2 = newff(x, t, [7, 5]);
  view(net2);
  close all;
  </code></pre>
  
  <p>However if I keep the handle of window, <code>close</code> function will close it:</p>
  
  <pre><code>net3 = newff(x, t, [9, 7]);
  h = view(net3);
  close(h);
  </code></pre>
  
  <p>But it's not easy for me to collect all those handles. How can I find all those handles programmatically?</p>