title: MATLAB - Generating a rand value vector (each value [0; 1] with at least X% zeros)?
body: <p>Does anybody know an efficent way to retrieve such a result?</p>
  
  <p>I could of course use rand(n,1) and then replace by iterating over the array values with zeros until the number of zeros is sufficient. (as written above atleast X% zeros it can also be more but not less)</p>
  
  <p>I would prefer a completly random distribution but also a uniform distribution would be fine. (So I have no real clue how the distribution effects the result)</p>
  
  <p>(Currently using MATLAB 2017a)</p>