MATLAB: Add gaussian distributed noise with mean and variance to matrix

gaussian noisematrixvariance

Hello,
I've seen that to add gaussian distributed noise to a matrix A with mean 0 and var = 5, this is the code
A_wnoise = A + 5*randn(size(A))
Now, how do you add noise with mean 5 and var = 5 to the matrix A? Thanks.

Best Answer

A_wnoise = A + 5*randn(size(A)) + 5;