title: How to implement Benford's law in MATLAB
body: <p>I want to implement a version of Benford's law (<a href="http://en.wikipedia.org/wiki/Benford%27s_law" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Benford%27s_law</a>)
  that basically asks for the first digit of a number to do analysis on the distribution.</p>
  
  <pre><code>1934---&gt; 1
  0.04 ---&gt; 4
  -56 ---&gt; 5
  </code></pre>
  
  <p>How do you do this in MATLAB?</p>