Wrong phase plot generated by angle()
조회 수: 16 (최근 30일)
이전 댓글 표시
I was trying to plot the phase spectrum of
using the angle function, however matlab gives me
which is incorrect since the phase of this signal is
, and ω is undefined at -1 and 1. The correct plot should be
. I wonder if I did something wrong or if it's something intertal of the angle() function.
which is incorrect since the phase of this signal is
. I wonder if I did something wrong or if it's something intertal of the angle() function.댓글 수: 0
답변 (1개)
Paul
2021년 10월 8일
The four-quadrant arctangent is needed to find the angle of a (non-zero) complex number:
syms w real
X(w) = 1/(1 + 1j*w)^2;
phase(w) = atan2(simplify(imag(X)),simplify(real(X)))
angle(X(1))
phase(1)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!