Hi I am trying to generate random numbers in MATLAB with a random MEAN value.
For example, if I use
e = mean(rand(1000,1))
the answer for e will always be close to 0.5.
What I want is for the value of e (mean) to be random,
so that e can be 0.1, 0.2, 0.3, etc…
Is it correct for me to use
e = mean( unifrnd(0,1,[1000,1]) ) ?
Thanks
Perhaps you want to generate normally distributed random numbers
X~N(0,1)with randn. Then you can change the mean and standard deviation to be random. As an example: