Communications_Engineer
Advanced Member level 3
- Joined
- Oct 10, 2008
- Messages
- 894
- Helped
- 179
- Reputation
- 358
- Reaction score
- 105
- Trophy points
- 1,323
- Location
- Sindh, Pakistan
- Activity points
- 5,542
matlab add noise
What type of noise do you want, if you want white noise, use the awgn command, so if I append it to your code,
T=0.05;
snr = 15;
t=(0:N-1)*T;
s=sin(2*pi*120*t);
subplot(3,1,1),plot(t,s);
s_noisy = awgn(s,snr);
fft_s=fft(s_noisy);subplot(3,1,2),plot(t,real(fft_s));
subplot(3,1,3),plot(t,imag(fft_s));
So this program will plot the real & quadrature part of the sine wave in frequency domain after it has been corrupted by noise so that the Signal to Noise ratio is 15 deci-Bells. It would also plot the sine wave in time domain
Hope you understood
---------------------------------------------------------------------------------------------
groups.yahoo.com/group/telecom_research
[/b]
miriyala said:>> N= 200;
T=0.05;
t=(0:N-1)*T;
s=sin(2*pi*120*t);
subplot(3,1,1),plot(t,s);
fft_s=fft(s);
subplot(3,1,2),plot(t,real(fft_s));
subplot(3,1,3),plot(t,imag(fft_s));
so , how to add noise to this coading ???????? pls send me reply. thanks
What type of noise do you want, if you want white noise, use the awgn command, so if I append it to your code,
T=0.05;
snr = 15;
t=(0:N-1)*T;
s=sin(2*pi*120*t);
subplot(3,1,1),plot(t,s);
s_noisy = awgn(s,snr);
fft_s=fft(s_noisy);subplot(3,1,2),plot(t,real(fft_s));
subplot(3,1,3),plot(t,imag(fft_s));
So this program will plot the real & quadrature part of the sine wave in frequency domain after it has been corrupted by noise so that the Signal to Noise ratio is 15 deci-Bells. It would also plot the sine wave in time domain
Hope you understood
---------------------------------------------------------------------------------------------
groups.yahoo.com/group/telecom_research
[/b]