how to produce a signal distorted with noise?
Show older comments
use using randn commmand?
Answers (1)
David Young
on 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);
Categories
Find more on Variables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!