How to extract phase information from freqs?

조회 수: 1 (최근 30일)
Luiz Fernando de Frias
Luiz Fernando de Frias 2016년 3월 3일
편집: Rick Rosson 2016년 3월 4일
I'm plotting using this:
freqs(butter_tf_num,butter_tf_den, scale)
But I want to adjust the X axis to another unit and set limits. So I do:
[H,W] = freqs(butter_tf_num,butter_tf_den, scale);
Freq_Hz = W(:)/2/pi;
subplot(3,2,1)
% Magnitude
plot(Freq_Hz, abs(H))
subplot(3,2,2)
% Phase
plot(Freq_Hz, atand(imag(H)./real(H)))
axis([600 1000 -200 200])
But the result is different... Why?

채택된 답변

Rick Rosson
Rick Rosson 2016년 3월 3일
편집: Rick Rosson 2016년 3월 4일
Instead of
atand(imag(H)./real(H))
please try using
angle(H)*180/pi

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by