bart.m

来自「solution for the Statistical modelling f」· M 代码 · 共 57 行

M
57
字号
function Px = bart(x,nsect)%BART	Bartlett's method of periodogram averaging.%----%USAGE	Px = bart(x,nsect) %%	The spectrum of a process x is estimated using Bartlett's %	method of periodogrm averaging.%	%	x     :  Input sequence%	nsect :	 Number of subsequences to be used in the average%%	The Bartlett estimate is returned in Px using a linear scale.%%  see also PER, 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).%---------------------------------------------------------------L  = floor(length(x)/nsect);Px = 0;n1 = 1;for i=1:nsect    Px = Px + per(x(n1:n1+L-1))/nsect;    n1 = n1 + L;    end;

⌨️ 快捷键说明

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