MATLAB: Implementation of Narrow band pass filter ( Butterworth)

bandpass filterbutterworth filterhomeworknarrow bandpasssignal processing

Hi all,
I'm struggling with implementation of narrow band pass filter. I understand from few suggestions (feedback) that it's too narrow and impulse is becoming too large. I also tried using the decimation but even it didn't work. I've posted my question in stackoverflow. Here is the link to it.
Could someone help me to solve this. Since this is part of my project. I'm little running short of time.
Thanks in advance for all your help and suggestion.

Best Answer

This seems to work, although freqz has problems with it for some reason:
% DEFINE FILTER PARAMETERS
Fs = 2E+6;
Fn = Fs/2;
Fc1 = 630;
Fc2 = 640;
Fs1 = Fc1*0.8;
Fs2 = Fc2/0.8;
Rp = 1;
Rs = 10;
% DESIGN FILTER
[n,Wn] = buttord([Fc1 Fc2]/Fn, [Fs1 Fs2]/Fn, Rp, Rs);
[b,a] = butter(n,Wn);
[sos,g] = tf2sos(b,a);
% CHECK FILTER PERFORMANCE
% figure(1)
% freqz(sos, 512, Fn)
s = zeros(1, Fs);
s(fix(Fs/2)) = 1; % Create Impulse Signal
y = filtfilt(sos, g, s); % Filter Signal
tfs = fft(y)./fft(s); % Calculate Transfer Funciton
Fv = linspace(0,1,length(s)/2+1)*Fn; % Frequency Vector
ix = 1:length(Fv); % Index Vector
figure(2)
plot(Fv, abs(tfs(ix)))
grid
axis([0 1000 ylim])