MATLAB: How to create a random matrix from a normal distribution given the mean and variance (mean = 2 and variance = 8).

meannormal distributionrandom matrixvariance

From a 100×100 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?

Best Answer

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.
Related Question