신호처리 | 필터의 진폭 응답 |
페이지 정보
작성자 cemtool 작성일14-04-23 18:57 조회13,458회 댓글0건본문
의 필터의 진폭 응답을 그려보자. 해당 오차 함수에 있는 극점의 개수를 세어보자.
- ex7_22.cem
% Chapter 7: Example 7.22 % Error function plot and counting of extrema figure(1); subplot(1,1,1) h = [1,2,3,4,3,2,1]/15; M = length(h); n = 0:M-1; [Hr,w,a,L] = Hres_t1(h); subplot(1,2,1);plot(w/pi,Hr);axis([0,1,-0.05,1.1]) xlabel("frequency in pi units"); title("Amplitude Response");hold on wp = w(1:52); ws = w(197:500); upb=Hr(1)*ones(length(wp),1); lpb=(2-Hr(1))*ones(length(wp),1); ipb=ones(length(wp),1); plot(wp/pi,upb,"r",wp/pi,ipb,"g",wp/pi,lpb,"r")usb=Hr(197)*ones(length(ws),1); lsb=zeros(length(ws),1); isb=0.5*usb; plot(ws/pi,usb,"r",ws/pi,isb,"g",ws/pi,lsb,"r"); hold off % %Error function plots subplot(1,2,2); erpb=Hr(1:52)-ipb; ersb=Hr(197:500)-isb; plot(wp/pi,erpb,ws/pi,ersb); axis([0,1,-.55,.55]); xlabel("frequency in pi units"); title("Error Function");hold on plot(wp/pi,upb-ipb,"r",wp/pi,lpb-ipb,"r")plot(ws/pi,usb-isb,"r",ws/pi,lsb-isb,"r"); hold off
댓글목록
등록된 댓글이 없습니다.