aaperiodogram.m

来自「Adaptive Filtering Primer with MATLAB」· M 代码 · 共 15 行

M
15
字号

function[s]=aaperiodogram(x,w,L)
%function[s]=aaperiodogram(x,w,L)
%w=window(@name,length(x)),(name=hamming,kaiser,hann,rectwin,
%bartlett,tukeywin,blackman,gausswin,nattallwin,triang,blackmanharris);
%L=desired number of points (bins) of the spectrum;
%x=data in row form;s=complex form of the DFT;
xw=x.*w';
for m=1:L
    n=1:length(x);
    s(m)=sum(xw.*exp(-j*(m-1)*(2*pi/L)*n));
end;
%as=((abs(s)).^2/length(x))/norm(w)=amplitude spectral density;
%ps=(atan(imag(s)./real(s))/length(x))/norm(w)=phase spectrum;
  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?