?? ex3009.m
字號:
n=0:100;x=cos(pi*n/2);
k=-100:100;w=(pi/100)*k;
X=x*(exp(-j*pi/100)).^(n'*k);
y=exp(j*pi*n/4).*x;
Y=y*(exp(-j*pi/100)).^(n'*k);
figure(1)
subplot(2,2,1);plot(w/pi,abs(X),'b');grid;
axis([-1,1,0,60])
xlabel('frequency in units of pi');ylabel('|X|')
title('Magnitude of X')
subplot(2,2,2);plot(w/pi,angle(X)/pi,'b');grid;
axis([-1,1,-1,1])
xlabel('frequency in unit of pi');ylabel('radians/pi')
title('Angle of X')
subplot(2,2,3);plot(w/pi,abs(Y),'b');grid;
axis([-1,1,0,60])
xlabel('frequency in units of pi');ylabel('|Y|')
title('Magnitude of Y')
subplot(2,2,4);plot(w/pi,angle(X)/pi,'b');grid;
axis([-1,1,-1,1])
xlabel('frequency in unit of pi');ylabel('radians/pi')
title('Angle of Y')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -