how to produce a signal distorted with noise?

Réponses (1)

David Young
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
ap singh le 4 Mar 2011
i made something like this
clc
close all
clear all
f=input('enter the 1 set of frequency=')
t=rand(1,28);
for i=1:8
t=linspace(0,1,2000);
x(1,:)=sin(2*pi*f(i)*t);
y=t+x;
end
y=reshape(x',1,length(x));
sound(x,8000)
wavwrite(y,8000,'apsondnoise.wav')
is it right??

Connectez-vous pour commenter.

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!

Translated by