how to create an vector contains 10000 random values that uniformly distributed with mean 1 and variance 10 ?

1 view (last 30 days)
how to create an vector contains 10000 random values that uniformly distributed with mean 1 and variance 10 ?

Accepted Answer

Torsten
Torsten on 7 Mar 2019
Edited: Torsten on 7 Mar 2019
mean = 1.0;
std = sqrt(10);
N = 10000;
u = (mean-sqrt(12)/2*std) + sqrt(12)*std*rand(N,1)
u is uniformly distributed on
[a:b] = [m-sqrt(12)/2*std:m+sqrt(12)/2*std]
with the prescribed mean and standard deviation.

More Answers (1)

Adam
Adam on 7 Mar 2019
Edited: Adam on 7 Mar 2019

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!