0
$\begingroup$

Here is matlab code ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ

fs = 2000;    
f = 0:20:1000;    
D = besselj(0,f);    
DD = fliplr(D);    
DD(1) = [];    
DD(end) = [];    
H = [D DD];    
h = ifft(H);

ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ

to make even fir filter

D : half desired frequency response

DD : half desired frequency response

h(1) and h(end) is not symmetric..........

help me

$\endgroup$
8
  • $\begingroup$ h(end) corresponds to h(2), not to h(1). $\endgroup$
    – Matt L.
    Jan 27, 2022 at 10:06
  • $\begingroup$ i'am sorry..... Could you speak again? $\endgroup$
    – gg h
    Jan 27, 2022 at 10:50
  • 1
    $\begingroup$ Well, it seems you think that h(1) and h(end) should be identical for the impulse response to be symmetrical. That's not the case. $\endgroup$
    – Matt L.
    Jan 27, 2022 at 11:31
  • $\begingroup$ because the filter didn't have linear phase right? $\endgroup$
    – gg h
    Jan 27, 2022 at 11:51
  • $\begingroup$ no, generally, that does not have to be the case. If the filter had linear phase, it'd be symmetric. $\endgroup$ Jan 27, 2022 at 11:55

1 Answer 1

1
$\begingroup$

Your impulse response is symmetric. Why do you think it's not?

Symmetry here means

$$h[n] = h[-n]$$

and since a DFT of length $N$ is inherently periodic in both domains with $N$ we can extend this to

$$h[n+kN] = h[-n+mN] \qquad m,n \in \mathbb{Z}$$

Matlab uses unfortunately an array offset of 1, i.e. $h[0]$ is coded as h(1) and $h[N-1]$ is h(N) or h(end).

Symmetry requires (for example) $h[1] = h[-1]$ which given the periodicity is also $h[1] = h[N-1]$ which in Matlab becomes h(2) = h(N)

$\endgroup$
2
  • $\begingroup$ but in low pass filter, the h(1) = h(end). in my case what is mean h(1)? $\endgroup$
    – gg h
    Jan 27, 2022 at 13:51
  • $\begingroup$ because of that is not linear phase? $\endgroup$
    – gg h
    Jan 27, 2022 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.