신호처리 | 이산 푸리에 변환 1 |
페이지 정보
작성자 cemtool 작성일14-04-23 15:26 조회14,315회 댓글0건본문
x(n)이 다음과 같은 4점 신호라 하자.
a) 이산 시간 푸리에 변환 을 계산하고, 그 크기와 위상을 그려라.
- ex5_6.cem
/* Chapter 5: Example 5.6 Simple DFT Example */ x = [1,1,1,1]; subplot(1,1,1); // a) DTFT w = [0:500:1]*2*pi/500; [H] = freqz(x,1,w); magH = abs(H); phaH = angle(H); phaH(126)=-47.5841*pi/180; subplot(2,1,1); plot(w/pi,magH); xtitle("frequency in pi units"); ytitle("|X|"); title("Magnitude of the DTFT"); subplot(2,1,2); plot(w/pi,phaH/pi*180); xtitle("frequency in pi units"); ytitle("Degrees"); title("Angle of the DTFT") subplot(1,1,1) pause
b) x(n)의 4점 DFT를 계산하라.
- ex5_6.cem
// b) 4-point DFT x = [1,1,1,1]; subplot(1,1,1); // a) DTFT w = [0:500:1]*2*pi/500; [H] = freqz(x,1,w); magH = abs(H); phaH = angle(H); phaH(126)=-47.5841*pi/180; N = 4; w1 = 2*pi/N; k = 0:N-1; X = dft(x,N); magX = abs(X); phaX = angle(X)*180/pisubplot(2,1,1);plot(w*N/(2*pi),magH,"--"); holdon stem(k,magX); xtitle("k"); ytitle("|X(k)|"); title("Magnitude of the DFT: N=4"); holdoff subplot(2,1,2);plot(w*N/(2*pi),phaH*180/pi,"--"); holdon stem(k,phaX,"-"); xtitle("k"); ytitle("Degrees"); title("Angle of the DFT: N=4")
댓글목록
등록된 댓글이 없습니다.