📄 periodogram_seg_yuqd.m
字号:
function [P, W] = periodogram_seg_yuqd(xn, L, Nfft);
%periodogram_yuqd(xn, Nfft) is a function wirtten by yuqd
%to estimate the PSD(power spectral density) of signal x
%The parameter Nfft used to spesify the number of fft points
%Wn is the normalized frequency(rad/s) at which PSD is estimated
% N-1
%use the function Ii(W)= abs( sum xi(n)exp(-jWn))^2/N
% n=0
% L
%use the function Pxx(exp(jW))= abs( sum Ii(w))/L
% i=1
%W = linspace(0,pi,Nfft);
N = length(xn);
M = floor(N/L); %length of each segment
W = linspace(0,pi,Nfft);
P = zeros(Nfft, 1);
for i=1:L %number of segment
H = freqz(xn((M*(i-1)+1):(M*i)),1,Nfft);
H = (abs(H)).^2;
H = H/M;
P = P + H;
end
P = P/L;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -