designing noise generator by using matlab

Status
Not open for further replies.

hitman1988

Member level 5
Joined
Nov 17, 2009
Messages
83
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,288
Location
iraq
Activity points
1,769
hi all

i wanna design a noise generator by using matlab , but not by sumlink method . i wanna design i by using programing method not the blocks
can you help me with that? please
 

hiiii
please help me , the problem is how to calculate the mean and the variance of this system in matlab the code as following
x = 1000;
y = 1000;
h = wgn(x,y,10);
plot(h)
 

Your code:

x = 1000;
y = 1000;
h = wgn(x,y,10);

Generates a 1000x1000 matrix of white gaussian noise in decibels, is that what you want?

If you are after adding a noise signal to signal or collection of data, you can use some like:

t = 0:.001:.25;
x = sin(2*pi*60*t); //60 Hz Sine Wave

y = x + 2*randn(size(t)); //Add random noise


plot(y(1:50))
title('Noisy time domain signal'); //Plot it


s = std; //Standard Deviation

v = var; //Variance

m = mean; //Mean
 

    hitman1988

    Points: 2
    Helpful Answer Positive Rating
i hope this will help, try "help awgn", which will calculate the signal power and add the desired amount of noise automatically.
 

philoman said:
i hope this will help, try "help awgn", which will calculate the signal power and add the desired amount of noise automatically.

In his question is how to create a noise function such as the awgn not to use the already created by mathwork
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…