How do I create a random matrix from a normal distribution given the mean and variance (mean = 2 and variance = 8).
조회 수: 10 (최근 30일)
이전 댓글 표시
From a 100x100 random matrix that I have previously created I need to create another random matrix from a normal distribution given the mean and variance (let's say that mean is 2 and variance is 8). Does anyone know how to do this?
댓글 수: 5
채택된 답변
Star Strider
2018년 10월 13일
I would just do this:
mu = 2;
vr = 8;
RandomNormalMatrix = mu + sqrt(vr)*randn(100);
댓글 수: 3
Tan Nguyen
2021년 4월 8일
Could you tell me how the result changes if we use randn(1000000) in spite of randn(100)?
Thank you,
추가 답변 (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!