How to extract phase information from freqs?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Luiz Fernando de Frias
am 3 Mär. 2016
Bearbeitet: Rick Rosson
am 4 Mär. 2016
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?
0 Kommentare
Akzeptierte Antwort
Rick Rosson
am 3 Mär. 2016
Bearbeitet: Rick Rosson
am 4 Mär. 2016
Instead of
atand(imag(H)./real(H))
please try using
angle(H)*180/pi
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!