Create a filter function that filters in the frequency domain
1 view (last 30 days)
Show older comments
I'm creating a function [Y] = filterfft (B,A,I) Where B is the filter's transfer function's numerator coefficients and A is the denominator coefficients and I is the input sequence. Basically it's the filter function but done in te frequency domain. I know there's a function for it already but I just wanna prove what the DSP lecture is trying to imply: that the filtering in the time domain (convolution) and multiplying the DFT of the input sequence and the DFT of the impulse response of the filter THEN IDFT will net the same output. So the procedures from my understanding is the following:
- Get the FFT of the input sequence - Get the impulse response sequence from the from filter coefficients and then get its FFT. - Multiply the two DFTs. - get its IFFT.
So much the output of this function is VERY FAR from the expected value when I use the FILTER function. Am I missing some maths in the process? And also what if the filter is an IIR, which means that its impulse response is infinite then the sequence which will be DFTing is infinite? How can I implement that in my function?
0 Comments
Answers (0)
See Also
Categories
Find more on Digital Filter Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!