⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 even_odd.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 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 + -