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 ?

15 次查看(过去 30 天)
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

采纳的回答

Dimitris Kalogiros
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by