aacorrelogram.m

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

M
16
字号

function[s]=aacorrelogram(x,w,lg,L)
%function[s]=aacorrelogram(x,w,lg,L)
%x=data with mean zero;w=window(@name,length(2*lg)), see aaperiodogram
%function and below this function);L=desired number of spectral points;
%lg=lag number<<N;rc=symmetric autocorrelation function;
r=aasample_biased_autoc(x,lg);
rc=[fliplr(r(1,2:lg)) r 0];
rcw=rc.*w';
for m=1:L
    n=-lg+1:lg;
    s(m)=sum(rcw.*exp(-j*(m-1)*(2*pi/L)*n));
end;
%asc=(abs(s).^2)/norm(w)=amplitude spectrum;
%psc=(atan(imag(s))/real(s))/norm(w)=phase spectrum;

⌨️ 快捷键说明

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