📄 welchse.m
字号:
function phi=welchse(y,v,K,L)%% The Welch method of spectral estimation.%% phi=welchse(y,v,K,L);%% y -> the data vector % v -> the window vector% K -> (j-1)K+1 is the starting point for the jth subsequence% 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. MosesN=length(y); % total data lengthM=length(v); % length of each observations to split from y% check the lengthsif (M > N) error('The window length is larger than the data length.'); returnelseif (K > N) error('The value of K exceeds the data length.'); returnendS=fix((N-M+K)/K); % number of subsamplesP=mean(v.^2); % the power of the window vector vy=y(:); % make y a column vector% compute the weighted periodgram for each subsample of observations% and sum the resultsphi=zeros(L,1);for i = 1 : S, phi=phi + periodogramse(y((i-1)*K+1:(i-1)*K+M),v,L);endphi=phi/S/P;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -