Generating random variable from certain standard deviation and mean
조회 수: 29 (최근 30일)
이전 댓글 표시
Could you please help me how can I generate random variable from Gaussian distribution with zero mean and 0.3 standard deviation?
댓글 수: 2
John D'Errico
2019년 7월 19일
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
2019년 7월 19일
Fair point. The finer points of math are not my strong suit, so I was going based on the title.
채택된 답변
Andrei Bobrov
2019년 7월 19일
편집: Andrei Bobrov
2019년 7월 19일
a = .3;% standard deviation
b = 0; % mean
out = a.*randn + b;
댓글 수: 0
추가 답변 (2개)
Torsten
2019년 7월 19일
n = 100;
x = 0.3*randn(n,1)
generates 100 normally distributed random numbers with mean 0 and standard deviation 0.3.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!