?? sin_d2.m
字號:
% Name: sin_d2.m
clear,close all,
n=-20:20;
x1=cos(0*pi*n/12);
x2=cos(pi*n/8);
x3=cos(pi*n/4);
x4=cos(pi*n/2);
x5=cos(pi*n);
x6=cos(3*pi*n/2);
x7=cos(7*pi*n/4);
x8=cos(15*pi*n/8);
x9=cos(2*pi*n);
subplot(331)
stem(n,x1,'r.'),axis([-20,20,-1.2,1.2])
title('w0=0*pi')
subplot(332)
stem(n,x2,'r.'),axis([-20,20,-1.2,1.2])
title('w0=pi/8')
subplot(333)
stem(n,x3,'r.'),axis([-20,20,-1.2,1.2])
title('w0=pi/4')
subplot(334)
stem(n,x4,'r.'),axis([-20,20,-1.2,1.2])
title('w0=pi/2')
subplot(335)
stem(n,x5,'r.'),axis([-20,20,-1.2,1.2])
title('w0=pi')
subplot(336)
stem(n,x6,'r.'),axis([-20,20,-1.2,1.2])
title('w0=3*pi/2')
subplot(337)
stem(n,x7,'r.'),axis([-20,20,-1.2,1.2])
title('w0=7*pi/4')
xlabel('Time n')
subplot(338)
stem(n,x8,'r.'),axis([-20,20,-1.2,1.2])
title('w0=15*pi/8')
xlabel('Time n')
subplot(339)
stem(n,x9,'r.'),axis([-20,20,-1.2,1.2])
title('w0=2*pi')
xlabel('Time n')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -