sampling.m

来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 19 行

M
19
字号
% Name: sampling.m
%
clear,close all,
t=-1:0.01:1;
n=-10:10;
x1=sin(pi*t)+sin(2*pi*t);
x2=sin(pi*n*0.1)+sin(2*pi*n*0.1);

subplot(221)
plot(t,x1)
%axis([0,2000,0,1.2])
grid on,title('The signal x(t)')
xlabel('Time t')

subplot(222)
stem(n,x2,'r.')
%axis([-5,5,0,1.2])
grid on,title('The sampled version of the signal x(t)')
xlabel('Time index n')

⌨️ 快捷键说明

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