Add gaussian distributed noise with mean and variance to matrix
135 views (last 30 days)
Show older comments
monkey_matlab on 5 Nov 2015
Commented: Muhammad Yasir on 14 Jul 2021
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.
Image Analyst on 5 Nov 2015
A_wnoise = A + 5*randn(size(A)) + 5;
Image Analyst on 14 Aug 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.
More Answers (1)
Muhammad Yasir on 12 Jul 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]'
Muhammad Yasir on 14 Jul 2021
Sorry, I could post it immediately. I have posted this question as per your advice. Here is the link to my Query:
Find more on Student's t Distribution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!