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

📄 sin_d.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 M
字号:
% Name: sin_d.m
clear,close all,
n=-20:20;
x1=cos(2*pi*n/12);
x2=cos(8*pi*n/31);
x3=cos(n/6);
subplot(311)
stem(n,x1,'r.'),axis([-20,20,-1.2,1.2])
title('Three examples of sinusoidal sequences')
subplot(312)
stem(n,x2,'r.'),axis([-20,20,-1.2,1.2])
subplot(313)
stem(n,x3,'r.'),axis([-20,20,-1.2,1.2])
xlabel('Time n')

x4=(1.1.^n).*cos(3*n/4);
x5=(0.9.^n).*cos(3*n/4);
x6=(1.1.^n);
x7=(0.9.^n);


figure(2)
subplot(221)
stem(n,x4,'r.'),hold on,plot(n,x6,'b:'),hold on,plot(n,-x6,'b:'),
title('Growing sinusoidal sequences')
xlabel('Time n')
subplot(222)
stem(n,x5,'r.'),hold on,plot(n,x7,'b:'),hold on,plot(n,-x7,'b:'),
xlabel('Time n')
title('Decaying sinusoidal sequences')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -