Imagine that I have written the following code in MATLAB.
numItems = 100 ;
Levels = [0.25, 0.5, 0.75, 1.0]
prob = [.25, .25, .25, .25]
I want to generate a discrete uniform distribution with values Levels for a vector of numItems elements considering the values of prob.
If I simply explain, I need to get something similar to np.random.choice in Numpy. I tried with unirnd but it is only possible with positive integeres by not floating point numbers.
Can anyone please help me with this ?