具体内容:利用“离散卷积和”函数(conv)计算两离散序列的离散卷积和,离散卷积序列的第一个点默认为0点,将0点调整为其他点进行离散卷积
%1.4.1离散卷积偏移
clc;
clear;
close all;
a=[-2,0,1,-1,3];
b=[1,2,0,-1];
c=conv(a,b);
n=-2:1:2;
m=-1:1:2;
p=-3:1:4;
subplot(3,1,1);
stem(n,a);
axis([-5,5,-6,6]);
title('A[n]');
subplot(3,1,2);
stem(m,b);
axis([-5,5,-6,6]);
title('B[n]');
subplot(3,1,3);
stem(p,c);
axis([-10,10,-6,6]);
title('C[n]');
偏移后:
偏移前:
偏移前的代码参考空间中另一篇文章