# white and 1/f noise, randn MATLAB

Status
Not open for further replies.

#### usualsuspect

##### Newbie level 3 randn matlab

In MATLAB

a = randn(1,1000) results in a vector of 1000 elements with a Gaussian distribution, mean=0 and variance=1.

b = cumsum(a) what is "b"? It seems to be meaningless.

c = sqrt(cumsum(a.^2)) If "a" is white noise, then is "c" 1/f noise? How is the mean and variance of "c" related to that of "a"?

Thanks.

#### Aya2002 noise matlab

you are generating (a) in your first step,

now, according to your application you will use it. any way, cumsum(a) is a vector containing the cumulative sum of the elements of a, this is according to the help of matlab.

in your second step, you said that (b) is meaningless. My friend, this is depends on your application's requirements, may be your applications asking you to do a cumulative some to your noise vector!!!

at the end, can you please be more clear so that may be some one else can help you more and more?

regards

#### usualsuspect

##### Newbie level 3 white noise in matlab

By using "cumsum", i.e. integrating (or accumulating) I was trying to create something similar to an ideal 1/f noise. However, this is probably not the right way to do it.

As an example, assume vector a = randn(1,1000) represent the period of a clock observed over 1000 cycles (period-to-period jitter), now if I synthesize a clock waveform with these random period; take the FFT of the clock waveform, remove the hamonics of the clock, I'm left with white noise, from which I can calculate the noise power and I should get the variance of my original vector.

Since each element of vector "a" is independent (memoryless), the noise is white, that's why I started thinking about accumulating, then I'm confused by what am I getting when I "integrate" a vector with Gaussian distribution.

Thanks

Status
Not open for further replies.