how to produce a signal distorted with noise?

Answers (1)

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 Comment

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??

Sign in to comment.

Categories

Asked:

on 3 Mar 2011

Community Treasure Hunt

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

Start Hunting!