How to plot the frequency response of a discrete cosine function?
4 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151716/image.png)
My attempt:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151717/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151718/image.png)
I tried doing it but I can't get the freq response to be plotted between pi and pi. Any help would be appreciated.
0 件のコメント
回答 (1 件)
Rick Rosson
2015 年 11 月 14 日
編集済み: Rick Rosson
2015 年 11 月 14 日
L = 1000;
n = 0:L-1;
x1 = fftshift(fft(x))/L;
dw = 2*pi/L;
w = -pi:dw:pi-dw;
stem(w,mag);
5 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!