?? e0611.m
字號:
t=0:pi/20:4*pi;y=exp(-0.2*t).*(cos(t)+i*sin(t));
subplot(2,2,1),plot(t,y); %只繪制實部圖形
title('plot of complex function vs time');xlabel('t');ylabel('y(t)');
t=0:pi/20:4*pi;y=exp(-0.2*t).*(cos(t)+i*sin(t)); %實部與虛部分別繪制圖形
subplot(2,2,2),plot(t,real(y),'b-'); %繪制實部的圖形
hold on;plot(t,imag(y),'r--'); %繪制虛部的圖形
title('plot of complex function vs time');xlabel('t');ylabel('y(t)')
legend('real','imaginary');hold off;
t=0:pi/20:4*pi;y=exp(-0.2*t).*(cos(t)+i*sin(t));
subplot(2,2,3),plot(y,'b-'); %同時繪制實部與虛部的圖形
title('plot of complex function ');xlabel('freal part');ylabel('imagainary part');
t=0:pi/20:4*pi;y=exp(-0.2*t).*(cos(t)+i*sin(t));
subplot(2,2,4),polar(angle(y),abs(y)); %繪制極坐標圖形
title('plot of complex function ');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -