?? dfs.m
字號:
n=-5:10;
x=0.5.^n.*(u(n)-u(n-5));
xs=0.5.^(n+5).*(u(n+5)-u(n))+0.5.^n.*(u(n)-u(n-5))+0.5.^(n-5).*(u(n-5)-u(n-10))+0.5.^(n-10).*(u(n-10)-u(n-15));
subplot(211)
stem(n,xs,'.')
title('The curve of a periodic sequence x(n)')
xlabel('Index n')
ylabel('The amplitude of x(n)')
k=-10:10;
w1=2*pi/5;
w=k*w1;
F=x*exp(-j*n'*w);
subplot(212)
stem(w,abs(F),'r.')
xlabel('Index w')
ylabel('The amplitude spectrum')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -