📄 even_odd.m
字号:
% Name: Even_Odd.m
t=-5:0.01:5;
n=-10:10;
x1=(t+2).*(u(t+2)-u(t))-(t-2).*(u(t)-u(t-2));
x2=(t+4).*(u(t+4)-u(t+2))-t.*(u(t+2)-u(t))-t.*(u(t)-u(t-2))+(t-4).*(u(t-2)-u(t-4));
x3=(n+4).*(u(n+4)-u(n))-(n-4).*(u(n)-u(n-4));
x4=(n+8).*(u(n+8)-u(n+4))-n.*(u(n+4)-u(n))-n.*(u(n)-u(n-4))+(n-8).*(u(n-4)-u(n-8));
subplot(221)
plot(t,x1,'r')
title('Even signal')
xlabel('Time t')
grid on
subplot(222)
plot(t,x2,'r')
title('Odd signal')
xlabel('Time t')
grid on
subplot(223)
stem(n,x3,'r.')
xlabel('Time n')
grid on
subplot(224)
stem(n,x4,'r.')
xlabel('Time n')
grid on
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -