randomness

goT's Avatar, Join Date: Jan 2006
goT
Go4Expert Member
int Xdata[100] = {100};
How to add Guassian noise with variance Var to Xdata?
.
0
coderzone's Avatar, Join Date: Jul 2004
Team Leader
Can you clarify a bit more on what you want to be doing with the variable and what is Var ...
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Please read Before you make a query thread so that you know what you are asking can be understood by the other people.
0
goT's Avatar, Join Date: Jan 2006
goT
Go4Expert Member
maybe to print it to screen or display it. Var is variance = 0.8, for example.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
How to Generate White Gaussian Noise probably can help you. What I found there is
Code:
   X=0
   for i = 1 to N
      U = uniform()
      X = X + U
   end
uniform is uniform random number generator between 0 and 1.