title: Using rand in matlab to produce numbers between limits
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2152334/is-there-a-way-in-matlab-using-the-pseudo-number-generator-to-generate-numbers-wi">Is there a way in Matlab using the pseudo number generator to generate numbers within a specific range?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to get 20 random integer numbers between -10 and 10 and I thought of using the rand function in matlab.</p>
  
  <p>I thought of myltiplying by ten and then finding a  way to get only the ones between -10 and 10 and use an iteration for each of the other numbers that is outside the limits [-10,10] to get a new number inside the limits.</p>
  
  <p>Is there a better, faster way?</p>