不同补零方式频谱的变化

已知长度为N的时间序列,若在尾部增加N个零,请编写一个程序来证明幅度谱的密度在0到2Π区间内增加了一倍;另外若添零方式改为每隔一个x(n)在添加,最后一共2N个零,此时的频谱又是怎样?
下面是我现在编写的,请问其他细节怎样补充,求解答。


clear;%  释放以前变量占用的内存空间,使它们变为inactive
close all;
%x1=rand(1,10);
x1=[1,2,3,4,5];
subplot(3,2,1);
stem(x1);
b=zeros(1,5);
x2=[x1,b];
subplot(3,2,2);
stem(x2);
subplot(3,2,3);
X1=fft(x1,5);
stem(X1);
subplot(3,2,4);
X2=fft(x2,10);
stem(X2);
subplot(3,2,5);
X11=abs(X1);
stem(X11);
subplot(3,2,6);
X22=abs(X2);
stem(X22);