How do I create a random matrix from a normal distribution given the mean and variance (mean = 2 and variance = 8).
13 次查看(过去 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!