title: Generate a random variable with an exponential distribution
body: <p>In Matlab using the <code>rand</code> routine, how should I write the code to generate 500 samples from an exponential distribution, whose pdf is: </p>
  
  <pre><code>(1/mu)*exp(-x/mu); x&gt;=0
  </code></pre>