📄 signals1.asv
字号:
%CONVOLUTION OF TWO SIGNALS
clc;
clear all;
x = input ('Enter the Sequence x(n): [..,..]');
h = input ('Enter the Sequence h(n): [..,..]');
n1 = input ('Enter the intervals for the Sequence x(n): [..,..]');
n2 = input ('Enter the intervals for the Sequence h(n): [..,..]');
nx = [n1(1):n1(2)];
nh = [n2(1):n2(2)];
nyl = nx(1) + nh(1);
nyr = nx(length(x)) + nh(length(h));
ny = [nyl:nyr];
y = conv(x,h);
figure;
subplot (1,1,1);
stem (ny,y);
xlabel ('n----->');
ylabel ('y(n)----->');
title ('convolution y(n)=x(n)*h(n)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -