Hi I'm trying to execute the below code to observe the impact of noise on the FFT of the signal. Even if i'm increasing noise content there is little impact on the signal's Spectrum. Why ?
5 views (last 30 days)
Show older comments
Deepak kumar
on 5 Sep 2018
Commented: Deepak kumar
on 26 Sep 2018
if true
% clc
clear all
close all
A=10;
F=2; %Signal Frequency
fs=50*F; %Sampling Frequency
t=0:1/fs:49*1/F; %Time Duration
%Original Signal
x=A*sin(2*pi*F*t);
subplot(511)
plot(t,x)
xlabel('time')
ylabel('X')
title('Original Signal')
%Adding Noise to the signal
n=8*randn(1,length(x));
y=x+n;
N=length(y);
subplot(512)
plot(t,y)
axis([0 inf -10 10])
xlabel('time')
ylabel('y')
title('Signal with Noise')
%Spectral Analysis of Noisy Signal
L=length(y);
NFFT=2^nextpow2(L);
y_fft=1/NFFT*abs(fft(y,NFFT));
f=fs/2*linspace(0,1,NFFT/2+1);
subplot(513)
plot(f,y_fft(1:length(f)))
xlabel('f')
ylabel('y_fft')
title('FFT of Noisy Signal')
end
0 Comments
Accepted Answer
Dimitris Kalogiros
on 5 Sep 2018
Your signal is a sinusoidal signal. All its energy is concentrated to one frequency. On the other hand, noise power spreads all over entire spectrum.
More Answers (0)
See Also
Categories
Find more on Spectral Measurements 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!