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

Paul
Paul 2022๋…„ 6์›” 5์ผ
ํŽธ์ง‘: Paul 2022๋…„ 6์›” 5์ผ
Hi Marina,
Do you know the math and just need help with implementation in code?
What have you tried so far?
Marina Petani
Marina Petani 2022๋…„ 6์›” 5์ผ
Hello! I know the math but not the implementation. i tried to create a dtft function but dont know how to solve this.
Paul
Paul 2022๋…„ 6์›” 5์ผ
If you show your code, you're more likely to get help.
If you are trying to use a DTFT-based approximation, you don't need to write your own function. freqz can be used to compute the DTFT of a finite duration sequence. Of course, h[n] is infinite duration, but I assume your DTFT function is assuming that there is some value N for which h[n] = 0 for n > N.
Marina Petani
Marina Petani 2022๋…„ 6์›” 5์ผ
function [H] = dtft(h,n,w)
H=h*exp(-j*n'*w);
end
Paul
Paul 2022๋…„ 6์›” 5์ผ
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)

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

๋„์›€๋ง ์„ผํ„ฐ ๋ฐ File Exchange์—์„œ MATLAB์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

์ œํ’ˆ

๋ฆด๋ฆฌ์Šค

R2022a

์งˆ๋ฌธ:

2022๋…„ 6์›” 5์ผ

๋Œ“๊ธ€:

2022๋…„ 6์›” 5์ผ

Community Treasure Hunt

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

Start Hunting!

Translated by