title: Error using dir Function is not defined for 'string' inputs
body: <p>I'm writing my first Matlab script, and I get an error trying to use dir().  This is the script:</p>
  
  <pre><code>strLocation = "C:\Users\myname\Documents\MATLAB";
  listing = dir(strLocation)
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
  <pre><code>Error using dir
  Function is not defined for 'string' inputs.
  </code></pre>
  </blockquote>
  
  <p>What am I doing wrong?</p>