Using Matlab's FFT function, I am getting different Amplitude values in a particular frequeny, when I use different range of Bandpass filters centering around that particular frequency. What's wrong here? How can a particular Amplitude scale be selected?
In the following code, I calculated two FFTs of the same signal over the frequency range of (59Hz to 61Hz) and (59.98Hz to 60.02Hz) after bandpassing them in the said range.
[x_noise,fs] = audioread(h);
x_noise = x_noise(1:length(x_noise)/360);
xlen = length(x_noise);
x_main=x_noise;
i=1;
%%
%Noise
f1=59;
f2=61;
fn=fs/2;
w1=f1/fn;
w2=f2/fn;
[b,a]=butter(5,[w1 w2],'bandpass');
xn_har = filter(b,a,x_noise);
%FFT of Noise
X_Noise = abs(fft(xn_har));
p = linspace(0,1000,length(X_Noise));
figure(1)
plot(p,X_Noise)
%%
%Signal
f1_sig=59.98;
f2_sig=60.02;
w1_sig=f1_sig/fn;
w2_sig =f2_sig/fn;
[b,a]=butter(5,[w1_sig w2_sig],'bandpass');
x_sig_har = filter(b,a,x_main);
%FFT of Signal
X_sig = abs(fft(x_sig_har));
q = linspace(0,1000,length(X_sig));
figure(2)
plot(q,X_sig)
But after doing FFT, the Amplitude in 60Hz seems to vary a lot. As seen in the image, one has a value of around 1600, while the other has around 1.2. Why is this happening, they are at the same frequency?