代码如下:

% 定义系统函数
h = 0.9.^(0:49);

% 定义输入序列
n = -5:50;
x = [ones(1,6), zeros(1,5), -ones(1,45)];

% 计算输出序列
y = conv(h,x);

% 绘制图像
subplot(3,1,1);
stem(n,x);
title('输入序列');
xlabel('n');
ylabel('x(n)');

subplot(3,1,2);
stem(0:49,h);
title('冲激响应');
xlabel('n');
ylabel('h(n)');

subplot(3,1,3);
stem(n,y(1:length(n)));
title('输出序列');
xlabel('n');
ylabel('y(n)');

运行结果如下:

LTI系统输入输出示例

标签: 科技


原文地址: https://cveoy.top/t/topic/clmG 著作权归作者所有。请勿转载和采集!