periodogramse.m

来自「谱估计及阵列信号处理算法仿真库」· M 代码 · 共 30 行

M
30
字号
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 vectorM=length(v);N=length(y);if (M>N)   error('The length of the window is larger than the length of the data vector');   returnelseif (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')endy=y(:);         % columlize the data matrix % generate the spectral estimatephi=(abs(fft((y(1:M).*v(:)),L)).^2)/M;

⌨️ 快捷键说明

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