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

📄 periodogramse.m

📁 现代信号谱估计算法的matlab代码 调用函数代码
💻 M
字号:
function phi=periodogramse(y,v,L)
%
% The windowed periodogram spectral estimator.
%
% phi=periodogramse(y,v,L)
%
%      y -> the data vector
%      v -> the window vector
%      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

% check the length of the window vector
M=length(v);
N=length(y);
if (M>N)
   error('The length of the window is larger than the length of the data vector');
   return
elseif (M<N),
   fprintf('WARNING:  The length of the window is smaller than the length\n')
   fprintf('          of the data vector; the data vector will be truncated\n')
   fprintf('          to the window length\n')
end

y=y(:);         % columlize the data matrix 
% generate the spectral estimate

phi=(abs(fft((y(1:M).*v(:)),L)).^2)/M;

⌨️ 快捷键说明

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