Borrar filtros
Borrar filtros

How to generate a noise which sums up as zero?

3 visualizaciones (últimos 30 días)
ANANTA BIJOY BHADRA
ANANTA BIJOY BHADRA el 1 de Ag. de 2023
Editada: David Goodmanson el 1 de Ag. de 2023
I have a sinusoidal downsampled signal. the size of the singal is 1*64. I need to add noise to that signal where sum of noise would be zero. How can I do that? The varience would be 0.001. I am new in this and don't have idea about this. I tried with randn command but I could get that? I tried the follwoing noise:
noise=randn(1,64)*sqrt(0.001)*240.
240 is the peak value of the singal and it has to be there.

Respuestas (1)

David Goodmanson
David Goodmanson el 1 de Ag. de 2023
Editada: David Goodmanson el 1 de Ag. de 2023
Hi Ananta,
noise=randn(1,64)*sqrt(0.001)*240
noise = noise - mean(noise);
if you subtract off the mean, then the new sum of the noise = 0.
Ordinarily you would add noise (variance=.001 in this case) to the signal. If you multiply the noise by 240, now its variance is up around 58 which may or may not be what you want.

Categorías

Más información sobre Spectral Measurements en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by