How do I create a random matrix from a normal distribution given the mean and variance (mean = 2 and variance = 8).
12 ビュー (過去 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!