How to find IDTFT of an array in matlab?

14 views (last 30 days)
We have freqz function to find the DTFT of an array which gives the 512 samples (0 to pi) in frequency domain.
For example freqz used on rectangular window of length 45, which gave 512 complex points array in frequency domain. Now I want to reverse this operation to get the rectangular window of 45 points in time domain.
Does matlab has any function for IDTFT or atleast there is a way we can acheive this with or without MATLAB.
Also how to get (0 to 2pi) points instead if (0 to pi) points using freqz?

Accepted Answer

Paul
Paul on 7 Mar 2022
Edited: Paul on 7 Mar 2022
As @Matt J noted, you can specify the frequency vector that freqz should use to cover whatever frequencies are desired. Or freqz accepts a parameter 'whole' that makes it use a frequency vector all the way around the unit circle (except the last point is not 2*pi, it's 2*pi - dw)
As for inverting the DTFT, I don't believe that Matlab has a built-in function. But the iDTFT is defined in terms of an integral which can be evaluted numerically (or symbolically I suppose). Assuming you already have h and w, the iDTFT integrand can potentially be computed by interpolation of h.
Here is a link that may be helpful. Based on the Question, I think you want the second version in Eq. 4.
If you try to code it up and have some problems, feel free to post a follow-up comment showing what you've done and what the problem is.
  3 Comments

Sign in to comment.

More Answers (1)

Matt J
Matt J on 7 Mar 2022
Does matlab has any function for IDTFT
It doesn't because your frequency domain data is not really continuous, you're really looking for the IFFT, which MATLAB does have a function for (namely ifft() ).
Also how to get (0 to 2pi) points instead if (0 to pi) points using freqz?
From the doc:
h = freqz(___,w) returns the frequency response vector h evaluated at the normalized frequencies supplied in w.
  4 Comments
Palguna Gopireddy
Palguna Gopireddy on 12 Mar 2022
So In the documaentation [h,w] = freqz(___,n,'whole'); means we should not give '_' directly, we should put array of numerator and denomenator parameters in that place?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by