Borrar filtros
Borrar filtros

add noise

2 visualizaciones (últimos 30 días)
contessa mima
contessa mima el 9 de Mzo. de 2012
How can i add some noise to a signal that i had already defined its equation?

Respuesta aceptada

Wayne King
Wayne King el 9 de Mzo. de 2012
You can use randn()
t = 0:0.001:1;
x = cos(2*pi*100*t);
y = x+randn(size(t));
Of course that assumes you want N(0,1) additive noise. If you want zero-mean Gaussian white noise with a different variance, then use
y = x+sqrt(var_value)*randn(size(t));
where var_value is the variance you want.
  2 comentarios
contessa mima
contessa mima el 9 de Mzo. de 2012
Actuallay i have this signal that i want to add noise:
T = 0:1/50E3:10E-3;
D = [0:1/1E3:10E-3;1.^(0:10)]';
Y = pulstran(T,D,'gauspuls',10E3,0.5);
so what instruction shall i add?
contessa mima
contessa mima el 4 de Abr. de 2012
can you more explain : var_value

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by