title: How can I generate random variables with my own Probability Mass Function in MATLAB?
body: <p>I have to generate a random variable that ranges from <code>20</code> to <code>30</code>,
  with <code>0.1</code> interval, 
  and the pmf of it is given by <code>1x101</code> matrix (for <code>x=20, 20.1, ... 29.9, 30</code>).</p>
  
  <p>Now I have to make random variable with this given pmf,</p>
  
  <p>But all I know about generating R.V is something related to gaussian, or uniformly distributed function.</p>
  
  <p>So is there any way to implement generating random variables with arbitrary pmf? </p>