?? per.m
字號:
function Px = per(x,n1,n2)%PER Estimate the spectrum of a process using the periodogram%-----------%USAGE Px = per(x,n1,n2) %% The spectrum of a process x is estimated using the periodogram.% % x : input sequence% n1 : starting index, x(n1)% n2 : ending index, x(n2)%% The periodogram is returned in Px using a linear scale.%% If n1 and n2 are not specified the periodogram of the entire% sequence is computed.%% see also BART, MPER, WELCH, and SPER%%---------------------------------------------------------------% copyright 1996, by M.H. Hayes. For use with the book % "Statistical Digital Signal Processing and Modeling"% (John Wiley & Sons, 1996).%---------------------------------------------------------------x = x(:);if nargin == 1 n1 = 1; n2 = length(x); end; Px = abs(fft(x(n1:n2),1024)).^2/(n2-n1+1); Px(1)=Px(2);end;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -