Why my impulse response is reversed ?

Hi,
Currently trying to find the impulse response of my low pass filter cheby1.
Here are the steps:
1/ find cheby1 coeff b,a.(filter_coeff_b & filter_coeff_a)
2/ find the frequency response with freqs (H)
3/ mirror the spectrum (HH)
4/ force DC and half sampling frequency of HH to zero
5/ inverse fourier transform to find impulse response
The impulse response seems fine, but it's reversed! Reversed impulse response
Here's my code:
T_b = 0.001
T_a = T_b/beta/gamma
beta=28
gamma=10
alpha=0.4
ordre_filtre=6
w = 2*pi*linspace(0, 1/2/T_a, beta*gamma*100)
[filter_coeff_b(1,:),filter_coeff_a(1,:)] = cheby1(ordre_filtre, 0.0501,((1+alpha)/2/T_b)*2*pi, 'low','s');
H(:,1) = freqs(filter_coeff_b(1,:), filter_coeff_a(1,:), w)';
HH = [H; conj(H(end-1:-1:2,:))];
HH(1,:)=0;
HH(28000,:)=0;
h=ifft(HH);

Answers (0)

Tags

Asked:

on 16 May 2016

Community Treasure Hunt

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

Start Hunting!