title: Matlab: custom distribution of random numbers
body: <p>I have a set of random numbers</p>
  
  <pre><code>randi([1 100],1,50) % numbers from 1 to 100 in a 1x50 array.
  </code></pre>
  
  <p>I want them to have a 1/x^2 distribution. I couldn't find a direct command to do that. I read about pdf functions but I'm not that familiar with matlab.</p>
  
  <p>Any ideas?</p>