Re: Pull a uniform sample



"AMBESAGIR HAGOS" <ambessagir@xxxxxxxxx> wrote in message
<g1kbpt$1ie$1@xxxxxxxxxxxxxxxxxx>...
Hi
I have a model which decides from 20 choices to one each
time. I arranged these 20 probabilities in range adding
one
to other and take it as a point. Hence i got 20 points
between 0 and 1. I want to order MATLAB to pull one of the
twenty points randomly. how can i do it using uniform
sample?
I am in urgent need of your advice

doc rand

% See Example 5

a = 1; b = 20;
x = a + (b-a) * rand

.



Relevant Pages

  • Re: Generate a sequence of random numbers that sum up to 1?
    ... probabilities PI, ... I did not know the uniform function until a ... specified number of random floating numbers whose sum ... Mail has the best spam protection around ...
    (comp.lang.python)
  • Re: calculating P(X>=Y)
    ... independence. ... force summation of the probabilities where X and Y satisfy X>=Y. ... The uniform is a special case where you can get a simple ... Well done Afonso. ...
    (sci.stat.math)

Loading