1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

randomness

Discussion in 'C' started by goT, Apr 14, 2006.

  1. goT

    goT New Member

    Joined:
    Jan 3, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    int Xdata[100] = {100};
    How to add Guassian noise with variance Var to Xdata?
    .
     
  2. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    734
    Likes Received:
    37
    Trophy Points:
    0
    Can you clarify a bit more on what you want to be doing with the variable and what is Var ...
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    Please read [thread=168]Before you make a query thread[/thread] so that you know what you are asking can be understood by the other people.
     
  4. goT

    goT New Member

    Joined:
    Jan 3, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    maybe to print it to screen or display it. Var is variance = 0.8, for example.
     
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    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.
     

Share This Page