Determine the frequency response

2 views (last 30 days)
Marina Petani
Marina Petani on 5 Jun 2022
Commented: Paul on 5 Jun 2022
Its given:
ℎ(n)={(0.95)^n cos(2𝜋0.066n) + (0.75)^n cos(2𝜋0.172n) + (0.6)^n cos(2𝜋0.241n)} 𝑢(n)
Find: |H(e^jw)| if w = 0, w = pi/2, w = pi.
Draw the graph of |H(e^jw)| if 0 < w < pi
Also find the phase spectrum.
  5 Comments
Marina Petani
Marina Petani on 5 Jun 2022
function [H] = dtft(h,n,w)
H=h*exp(-j*n'*w);
end
Paul
Paul on 5 Jun 2022
The DTFT is a sum over n, so you'll either
a) use the sum function combined with element wise multiplication times, .*
or
b) use a loop over n to sum up h(n)*exp(-1j*n*w)

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!