- 代码
n = -2:5;
x = exp(-0.5*n);
x1 = fliplr(x);
n1 = -fliplr(n);
subplot(211)
stem(n,x,'filled','r');
title('x(n');
subplot(212)
stem(n1,x1,'filled','b');
title('x(-n)');
figure
stem(n,x,'filled','r');
hold on
stem(n1,x1,'filled','b');
- 结果
n = -2:5;
x = exp(-0.5*n);
x1 = fliplr(x);
n1 = -fliplr(n);
subplot(211)
stem(n,x,'filled','r');
title('x(n');
subplot(212)
stem(n1,x1,'filled','b');
title('x(-n)');
figure
stem(n,x,'filled','r');
hold on
stem(n1,x1,'filled','b');