Run and plot complex function
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi
I am trying to run this code:
Omega=-pi:pi/100:pi;
X=exp(i*Omega)./exp(i*Omega)-0.8;
subplot(3,2,1), plot(Omega/pi,abs(X))
ylabel('|X|')
subplot(3,2,2), plot(Omega/pi,angle(X)*180/pi)
ylabel('Angle (X), degree')
However I got some errors and I am not sure why.
Regards.
댓글 수: 0
채택된 답변
Alan Stevens
2021년 3월 9일
You probably meant to put parentheses in the following line:
X=exp(1i*Omega)./exp(1i*Omega)-0.8;
Did you mean:
X=exp(1i*Omega)./(exp(1i*Omega)-0.8);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!