# Given a plot of both the magnitude $|H(\omega)|$ and its angle, How can you find the $H(\omega)$?

I'm specifically trying to use an inverse Fourier Transform to find $$h(t)$$, but I'm finding it difficult to get $$H(\omega)$$ in the first place.

I'm under the impression from my textbook that $$H(\omega) = |H(\omega)|e^{j\arg\{H(\omega)\}}$$, and that $$h(t)$$ would just be the inverse Fourier Transform of that.

• You're right about all that, so I guess there's no question, is there? – Matt L. Nov 13 '18 at 21:29

Yes you are right. Let's practically implement it with Matlab / Octave.

N = 8;
h = [1,2,3,4,4,3,2,1];    % just an impulse response (FIR)

H = fft(h,N);             % DFT H[k] of h[n] as samples of H(w) at w = 2*pi*k/N

Hm = abs(H);              % extract the magnitude of H[k]
Hp = angle(H);            % extract the phase angle of H[k]

Hr = Hm.*exp(j*Hp);       % Reconstruct H[k] from its magnitude and phase

hr = ifft( Hr, N);        % reconstruct h[n] from the reconstructed Hr[k]