How do I create a random matrix from a normal distribution given the mean and variance (mean = 2 and variance = 8).

11 次查看(过去 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
Star Strider 2018-10-13
I would just do this:
mu = 2;
vr = 8;
RandomNormalMatrix = mu + sqrt(vr)*randn(100);
See the documentation on the randn (link) function for details.
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by