⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 btse.m

📁 现代信号谱估计算法的matlab代码 调用函数代码
💻 M
字号:
function phi=btse(y,w,L)
%
% The spectral estimator using the Blackman-Tukey method.
% The covariance lags are obtained from the standard biased
% estimate.
%
% phi=btse(y,w,L);
%
%      y -> the data vector
%      w -> the window function (for k=0, ..., M-1)
%      L -> the number of psd samples
%    phi <- spectral estimates at L frequencies w=0, 2*pi/L, ..., 2*pi(L-1)/L

% Copyright 1996 by R. Moses

% make sure the length of the window is less than or equal 
% to the total data length
M=length(w);
N=length(y);
if (M>N)
   error('The length of the window is longer than the data length.');
   return
end

% generate the covariance estimate
r=xcorr(y,'biased');    %vector of biased covariance estimates
r=r(N:N+M-1);           % get r(0) to r(M) only
    
rw = r(:).*w(:);        % the windowed ACS from 0 to M

% generate the spectral estimate

phi=2*real(fft(rw,L))-rw(1);    





⌨️ 快捷键说明

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