how to produce a signal distorted with noise?
Afficher commentaires plus anciens
use using randn commmand?
Réponses (1)
David Young
le 3 Mar 2011
It depends on what characteristics you want the noise to have. If you want noise from a normal distribution with the samples independent, then yes, randn is the right function. For example, if the noise is to be additive:
N = 500;
signal = sin((1:N) * 0.05);
noiseLevel = 0.1;
noise = noiseLevel * randn(1, N);
noisySignal = signal + noise;
plot(noisySignal);
1 commentaire
ap singh
le 4 Mar 2011
Catégories
En savoir plus sur Variables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!