Generating random variable from certain standard deviation and mean
24 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alin Brad
am 19 Jul. 2019
Beantwortet: Alin Brad
am 22 Jul. 2019
Could you please help me how can I generate random variable from Gaussian distribution with zero mean and 0.3 standard deviation?
2 Kommentare
John D'Errico
am 19 Jul. 2019
Bob - Note that the page you are sending them too is a question asking how to generate numbers that have a truncated normal distribution. That is different.
Bob Thompson
am 19 Jul. 2019
Fair point. The finer points of math are not my strong suit, so I was going based on the title.
Akzeptierte Antwort
Andrei Bobrov
am 19 Jul. 2019
Bearbeitet: Andrei Bobrov
am 19 Jul. 2019
a = .3;% standard deviation
b = 0; % mean
out = a.*randn + b;
0 Kommentare
Weitere Antworten (2)
Torsten
am 19 Jul. 2019
n = 100;
x = 0.3*randn(n,1)
generates 100 normally distributed random numbers with mean 0 and standard deviation 0.3.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Random Number Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!