title: list the subfolders in a folder - Matlab (only subfolders, not files)
body: <p>I need to list the subfolders inside a folder using Matlab.  If I use </p>
  
  <pre><code>nameFolds = dir(pathFolder), 
  </code></pre>
  
  <p>I get <code>.</code> and <code>..</code> + the subfolder names.  I then have to run <code>nameFolds(1) = []</code> twice. Is there a better way to get the subFolder names using Matlab?  Thanks.</p>