signals1.asv

来自「this file consists of many matlab progra」· ASV 代码 · 共 26 行

ASV
26
字号
%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 + =
减小字号Ctrl + -
显示快捷键?