Phase-plot when using freqz
    조회 수: 24 (최근 30일)
  
       이전 댓글 표시
    
Hi all.
Why does these two methods not create the same plot?
figure()
G3=[0.0178750173569734]
num3=[1,-2.22044604925031e-16,-1.00000000000000]
den3=[1,-1.96419015432470,0.964249965286053]
freqz(G3*num3,den3,1000,44100);
ax = findall(gcf, 'Type', 'axes');
set(ax, 'XLim', [0 500]), ylim([-15 1])
Amplitude-plot is the same, but phae plot differ from this one:
[H,w]=freqz(G3*num3,den3,1000,44100);
figure(), subplot(2,1,1)
plot(w,20*log10(abs(H)))
title('Frekvenskarakteristik')
xlabel('Frekvens [Hz]'), ylabel('Amplitude [dB]')
axis([0 500 -15 1]), grid
subplot(2,1,2)
plot(w,angle(H))
xlabel('Frekvens [Hz]'), ylabel('Fase')
axis([0 500 -100 50]), grid
댓글 수: 0
채택된 답변
  Vieniava
      
 2011년 3월 25일
        It is a matter of expressing angle in degrees or radians. Replace:
plot(w,angle(H))
with
plot(w, 360/(2*pi)*angle(H))
추가 답변 (1개)
  Hassan Naseri
      
 2011년 4월 1일
        You still need to unwrap the result to be the same as freqz output:
unwrap(angle(h)
or if you want it in degrees:
360/(2*pi)*unwrap(angle(H))
댓글 수: 1
  gbernardi
 2012년 11월 8일
				This topic could be dead now, but I'd still like to point out that in some cases I cannot obtain the same result of freqz, although I perform both rad2deg conversion and phase unwrapping...
Has anybody experience this problem?
참고 항목
카테고리
				Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
			
	제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!