Add gaussian distributed noise with mean and variance to matrix
45 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
monkey_matlab
el 5 de Nov. de 2015
Comentada: Muhammad Yasir
el 14 de Jul. de 2021
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.
0 comentarios
Respuesta aceptada
Image Analyst
el 5 de Nov. de 2015
A_wnoise = A + 5*randn(size(A)) + 5;
4 comentarios
Deryk Smith
el 13 de Ag. de 2020
What if your variance is supposed to be (0:0.1:10)? the code does not work then.
Image Analyst
el 14 de Ag. de 2020
Variance can't be an array. However you can put one variance into randn() and put it into a loop over all variances to get a family of arrays.
Más respuestas (1)
Muhammad Yasir
el 12 de Jul. de 2021
How can I generate a noise sequence w_t, which is i.i.d. Gaussian of mean zero with variance 2I3 (2xI3 ,where I3 is identity matrix of dimension 3x3) and the initial condition is x_init = [10 10 −10]'
6 comentarios
Image Analyst
el 13 de Jul. de 2021
"OK, I will do that..." <== I just checked and it's not there yet.
Muhammad Yasir
el 14 de Jul. de 2021
Sorry, I could post it immediately. I have posted this question as per your advice. Here is the link to my Query:
https://uk.mathworks.com/matlabcentral/answers/878528-how-to-generate-iid-gaussian-noise-vector
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!