亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? glstat.m

?? 這個是基于matlab的信號處理類的高階譜工具箱
?? M
字號:
function [sg, sl] = glstat(x,cparm,nfft)
%GLSTAT	Detection statistics for Hinich's Gaussianity and linearity tests
%	[sg, sl] = glstat(x,cparm,nfft)
%	x     - time series
%	cparm - resolution (smoothing) parameter c;
%	        0.5 < c < 1.0 [default = 0.51]
%	        increasing c reduces the variance,
%	        but increases the bias (window bandwidth).
%	nfft  - fft length [default = 128]
%	sg    - statistic for the Gaussianity test
%	        [observed chi_sq value, dg, PFA]
%	sl    - statistic for the linearity test
%	        [R_estimated, lambda, R_theoretical]
%
%	Under the assumption of Gaussianity, the test statistics S is
%	      chi-squared distributed with df degrees of freedom.
%	Under the assumption of non-zero skewness and linearity, the test
%	      statistic R should be approximately equal to the inter-quartile
%	      range of a chi-squared distribution with two degrees of freedom,
%	      and non-centrality parameter lambda.
%

%  Copyright (c) 1991-2001 by United Signals & Systems, Inc. 
%       $Revision: 1.4 $
%  A. Swami   January 20, 1993.
%  A. Swami,  October 14, 1994, Revised.
%  A. Swami,  February 23, 1995, added `N' printout in linearity test

%     RESTRICTED RIGHTS LEGEND
% Use, duplication, or disclosure by the Government is subject to
% restrictions as set forth in subparagraph (c) (1) (ii) of the
% Rights in Technical Data and Computer Software clause of DFARS
% 252.227-7013.
% Manufacturer: United Signals & Systems, Inc., P.O. Box 2374,
% Culver City, California 90231.
%
%  This material may be reproduced by or for the U.S. Government pursuant
%  to the copyright license under the clause at DFARS 252.227-7013.

% ---------------- parameter checks: ----------------------

   if (min(size(x)) ~= 1)
      error('x: should be a vector')
   end
   nsamp = length(x);
   if (exist('nfft') ~= 1) nfft = 128; end
   nrecs = floor(nsamp/nfft);
   nrecs = max(nrecs,1);
   ksamp = min(nfft,nsamp);
   if (nfft  > nsamp)
      disp([' glstat results are unreliable if zero-padding is severe: '])
      disp(['    fft length= ',int2str(nfft),' data length=',int2str(nsamp)])
   end

   if (exist ('cparm') ~= 1) cparm = 0.51; end
   if (cparm >= 1.0)
      error('cparm  cannot be greater than or equal to 1.')
   end
   if (cparm <=0.5 & nrecs == 1)
      error('cparm: for single segments: allowed range is (0.5,1.0) ')
   end

   M = fix(nfft^cparm);  M = M + 1 - rem(M,2);
   Msmuth = M;
% ----------------- estimate raw bispectrum ------------------------

   mrow = fix(nfft/3)+1; ncol = fix(nfft/2)+1;
   F = zeros(mrow,ncol);
   S = zeros(nfft,1);

   mask  = hankel ([1:mrow],[mrow:mrow+ncol-1]);
   ind   = 1:ksamp;
   for k=1:nrecs
       y = x(ind);
       xf = fft(y-mean(y), nfft);
       xc = conj(xf);
       S  = S + xf .* xc;                          % power spectrum
       F = F + xf(1:mrow) * xf(1:ncol).' .* ...
           reshape (xc(mask), mrow, ncol) ;
      ind = ind + ksamp;
   end
   F = F /(nfft*nrecs);                   % `Raw' bispectrum F as in Eq (2.3)
   S = S /(nfft*nrecs); 	          % `Raw' power spectrum

% ---------- zero out area outside principal domain ---------------

   ind = (0:(mrow-1))';
   F(1:mrow,1:mrow) = triu(F(1:mrow,1:mrow));
   Q = ones(mrow, ncol);
   Q(1:mrow,1:mrow) = triu(Q(1:mrow,1:mrow)) + eye(mrow);

% the 2f1 + f2 = 1 line:

   r = ( rem(nfft,3) == 2);        % ans oct 94: also -r next line
   for k=mrow+1:ncol-r
       j = k-mrow;
       Q(mrow-2*j+2:mrow, k) = zeros(2*j-1,1);
       F(:, k) = F(:,k) .* Q(:,k);
       Q(mrow-2*j+1, k) = 2;                      % factor 2 on boundary
   end

   F = F(2:mrow,2:ncol);      % in principal domain, no dc terms
   Q = Q(2:mrow,2:ncol);
   mrow = mrow-1;
   ncol = ncol-1;

% -------- smooth the estimated spectrum and bispectrum ------------
%  Msmuth x Msmuth box-car smoother
%  only every Msmuth term in the smoothed output is retained
%  "independent" estimates

   M = Msmuth;
   mby2 = (M+1)/2;
   m1 = rem(mrow,M); m2=rem(ncol,M);
   m1 =  - m1 + M * (m1 ~= 0);
   m2 =  - m2 + M * (m2 ~= 0);
   F  = [F, zeros(mrow,m2); zeros(m1,ncol+m2)];
   Q  = [Q, zeros(mrow,m2); zeros(m1,ncol+m2)];

   k  = size(F)/Msmuth;
   k1 = k(1); k2 = k(2);

% Apply the box car smoother
%  can replace the next ten lines or so with
% B =kron(eye(k1),ones(1,Msmuth)) * F * kron(eye(k2),ones(Msmuth,1))/Msmuth^2;
% Q =kron(eye(k1),ones(1,Msmuth)) * Q * kron(eye(k2),ones(Msmuth,1));

ind = 1:Msmuth;
B = zeros(k1,k2); Q1 = B;
for i=1:k1
    for j=1:k2
        t = F( (i-1)*Msmuth+ind, (j-1)*Msmuth+ind );
        B(i,j) = mean(t(:));
        t = Q( (i-1)*Msmuth+ind, (j-1)*Msmuth+ind );
        Q1(i,j) = sum(t(:));
    end
end
Q = Q1;

% --------------
% At this point B corresponds to B  in eq (2.6) of Hinich's paper
%    and Q corresponds to the definition following eq (2.8)
% --------------
   M   = Msmuth;
   S   = conv(S, ones(M,1))/M;
   S   = S(M+1:M:M+nfft-1);
   S1  = B*0;
%   S1  = S(1:k1) * S(1:k2)' .* hankel(S(1:k1),S(k1:k1+k2-1));
   S1  = S(1:k1) * S(1:k2)' .* hankel(S(2:k1+1),S(k1+1:k1+k2)); 
   S1  = ones(k1,k2) ./ S1;
   ind = find(Q > 0);
   Q   = Q(ind);
   Bic = S1(ind) .* abs(B(ind)).^2;          % squared bicoherence

%-------------------------------------------------------------------
%----------------- Gaussianity (non-skewness) test -----------------
%-------------------------------------------------------------------

   scale      = 2 * (Msmuth^4) / nfft;
   Xstat      = scale * Bic ./ Q;       % 2 |X(m,n)|^2 in (2.9)

   df      = length(Q) * 2;             % degrees of freedom
                                        % asymptotic value is (nfft/M)^2 / 6
   chi_val = sum(Xstat);                % observed value of chi-square r.v.

% Reference:
% Sankaran's approximation given in [7.9.4], p 197, of
% J.K. Patel and C.B. Read,   M. Dekker, New York, 1982.
% `Handbook of the Normal Distribution'
% the cdf of chi(df,lam,x) is approximated by phi(y) [normal distro cdf]
% where y = [ (x/(df+lam))^h - a ] / b;
% and h, a, b are defined below

% For a given df, and chi-sq value, the PFA is the probability that
% we will be wrong in accepting the alternate hypothesis; i.e.,
% data are non-skewed.

   h = 1/3;    b = sqrt(2/df) / 3;    a = (1-b^2);
   y = (chi_val/df)^(1/3);   y = (y-a)/b;
   pfa = 0.5 * erfc(y/sqrt(2));
   pfa = round(pfa*10000)/10000;     % round to five decimal places

   disp(['Test statistic for Gaussianity is ', num2str(chi_val), ...
         ' with df = ',int2str(df), ', Pfa = ',num2str(pfa)])
   sg  = [chi_val, df, pfa];

% -----------------------------------------------------------------
% ---------------------- linearity test ---------------------------
% -----------------------------------------------------------------

% ---- find the first and third quartiles of 2|Xmn|^2 = Xstat

   ind   = find(Q == M^2);
   rtest = Xstat(ind);
   rtest = sort(rtest);
   l1    = length(rtest);
 if (l1 < 4)
    fprintf('glstat: cparm (%g) is too large or nfft (%g) is too small', ...
    	     cparm,nfft);
    fprintf('\n   estimated interquartile range (R) set to NaN \n');
    Rhat = NaN;
 else
   lo1 = fix(l1/4);    lo2 = fix(l1/4+0.8);
   hi1 = fix(3*l1/4);  hi2 = fix(3*l1/4+0.8);
   r1  = (rtest(lo1)+rtest(lo2))/2;
   r3  = (rtest(hi1)+rtest(hi2))/2;
   Rhat  = r3 - r1;                 % sample inter-quartile range
end

% ----- estimated lambda: a scaled version of mean FD skewness
%   lam = 2/(df * Msmuth^2) * sum ( Q.*Xstat - 2);    % Hinich's (4.2)
    lam = mean(Bic) * 2 * Msmuth^2 / nfft;            % equivalent

%-----  find the `theoretical inter-quartile' range of chi-sq(df=2,lam)
% See reference cited earlier.

    df = 2;                                 % for our problem, df=2
    h  = 1/3 + (2/3) * ( lam / (df + 2*lam) )^2;
    a  = 1 + h * (h-1) * (df + 2*lam) / ( (df+lam)^2 ) ...
        - h * (h-1) * (2-h) * (1-3*h) * (df + 2*lam)^2 / (2 * (df+lam)^4);
    b  = h * sqrt(2 * (df+2*lam) ) / (df+lam)  ...
        * (  1 - (1-h) * (1-3*h) * (df+2*lam) / ( 2*(df+lam)^2) );

    yn   = sqrt(2) * erfinv(2*[-.25,.25]);       % quartiles of Phi
    xc   = (a+b*yn).^(1/h) * (df + lam);         % quartiles of Chi
    Rth  = xc(2)-xc(1);                          % IQ range

 sl      = [Rhat, lam, Rth];
 disp(['Linearity test:  R (estimated) = ',num2str(Rhat), ...
        ', lambda = ', num2str(lam), ', R (theory) = ', num2str(Rth), ...
	', N = ',int2str(length(rtest)) ])
return

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产蜜臀av在线一区二区三区| 成人激情免费视频| 亚洲欧美日本韩国| 成人免费在线播放视频| 中文字幕国产精品一区二区| 久久久久久免费| 欧美韩日一区二区三区| 国产精品色哟哟网站| 亚洲精选一二三| 亚欧色一区w666天堂| 蜜臀久久久99精品久久久久久| 日日夜夜一区二区| 久久av中文字幕片| 成人精品视频一区二区三区| 91美女片黄在线观看91美女| 日本电影欧美片| 7777精品伊人久久久大香线蕉完整版 | 日韩三级免费观看| 欧美va天堂va视频va在线| 2021久久国产精品不只是精品| 精品免费国产二区三区 | 高清在线观看日韩| 色老汉一区二区三区| 欧美日韩电影在线| 久久综合九色综合欧美98| 国产精品美女久久福利网站| 亚洲女同女同女同女同女同69| 午夜欧美一区二区三区在线播放 | 久久久久久亚洲综合影院红桃 | 欧美日韩免费一区二区三区| 制服丝袜成人动漫| 精品剧情v国产在线观看在线| 国产精品免费看片| 日本不卡1234视频| 91亚洲国产成人精品一区二三| 欧美乱妇20p| 国产丝袜在线精品| 日本在线不卡一区| 99久久国产免费看| 欧美v日韩v国产v| 亚洲欧美经典视频| 国产精品白丝av| 宅男在线国产精品| 亚洲精品美腿丝袜| 成人午夜在线视频| 日韩欧美在线一区二区三区| 亚洲视频一区在线观看| 日韩高清不卡一区二区| 在线免费观看不卡av| 国产色91在线| 精品中文字幕一区二区小辣椒| 91美女片黄在线| 欧美激情一区二区三区全黄 | 夜夜揉揉日日人人青青一国产精品| 捆绑紧缚一区二区三区视频| 欧美在线免费观看视频| 中文字幕中文字幕中文字幕亚洲无线| 精品一区二区三区在线观看| 欧美精品色综合| 亚洲无人区一区| 在线亚洲高清视频| 亚洲男人的天堂网| 99re亚洲国产精品| 综合在线观看色| 高清国产一区二区| 国产人久久人人人人爽| 精品亚洲欧美一区| 精品国产一区二区亚洲人成毛片 | 亚洲影视资源网| 一本一本久久a久久精品综合麻豆| 久久久精品影视| 国产盗摄视频一区二区三区| 精品91自产拍在线观看一区| 蜜臀av一区二区| 精品免费99久久| 狠狠色丁香九九婷婷综合五月| 337p亚洲精品色噜噜狠狠| 日本成人中文字幕在线视频| 欧美精品在线观看一区二区| 午夜精品久久久久久久| 欧美一区二区三区系列电影| 看电影不卡的网站| 国产欧美日韩中文久久| 成人免费视频一区二区| 日韩美女视频一区二区| 欧美性猛交一区二区三区精品| 亚洲第一福利一区| 欧美电视剧在线看免费| 国产精品综合久久| 亚洲婷婷综合色高清在线| 一本色道综合亚洲| 麻豆免费精品视频| 国产精品色眯眯| 欧美三级资源在线| 日韩av电影一区| 国产日韩欧美精品在线| www.日韩av| 五月婷婷久久丁香| 国产日韩视频一区二区三区| 色综合色狠狠综合色| 麻豆免费看一区二区三区| 国产精品美女久久久久久久网站| 欧美在线观看视频一区二区 | jlzzjlzz亚洲日本少妇| 亚洲与欧洲av电影| 欧美精品一区二区三区视频 | 久久成人综合网| 国产精品每日更新在线播放网址| 在线观看区一区二| 国产一区在线观看视频| 一区二区三区四区在线| 欧美成人三级电影在线| 91麻豆免费在线观看| 极品瑜伽女神91| 亚洲一二三四区不卡| 国产日韩综合av| 日韩精品一区二区三区在线播放| 91在线精品一区二区三区| 久久国产尿小便嘘嘘| 亚洲已满18点击进入久久| 中文天堂在线一区| 日韩欧美精品在线| 欧美性大战久久久| 成人白浆超碰人人人人| 久久精品国产精品亚洲红杏 | 日韩一区二区电影在线| 91欧美一区二区| 国产福利不卡视频| 麻豆国产欧美一区二区三区| 亚洲在线一区二区三区| 中文字幕一区二区三区视频| 久久综合九色综合97婷婷女人 | 色综合视频一区二区三区高清| 精品午夜久久福利影院| 午夜精品福利一区二区三区av | 欧美军同video69gay| 91视频精品在这里| 成人小视频在线| 国产成人精品影视| 国产精品亚洲第一| 国产精品亚洲成人| 国产99精品视频| 国产成人精品免费视频网站| 精品一区二区在线观看| 九色综合狠狠综合久久| 精品一区二区av| 国产一级精品在线| 高清国产一区二区三区| 国产成人免费av在线| 国产一区二区三区在线观看免费 | 亚洲综合免费观看高清在线观看| 国产精品色呦呦| 中文字幕一区二区三区不卡在线 | 日韩午夜小视频| 777精品伊人久久久久大香线蕉| 欧美日韩一二区| 69堂国产成人免费视频| 91精品国产综合久久婷婷香蕉 | 亚洲一区二区中文在线| 亚洲精品大片www| 亚洲va国产va欧美va观看| 五月婷婷激情综合网| 麻豆精品精品国产自在97香蕉| 极品美女销魂一区二区三区免费| 麻豆成人免费电影| 国产精品99久久久| 91美女视频网站| 7777精品伊人久久久大香线蕉最新版| 51久久夜色精品国产麻豆| 久久亚洲欧美国产精品乐播| 亚洲国产成人午夜在线一区| 亚洲欧洲综合另类| 午夜免费久久看| 国产激情视频一区二区在线观看| 成人精品视频一区二区三区| 欧美三级午夜理伦三级中视频| 69堂成人精品免费视频| 国产日韩欧美在线一区| 亚洲综合色噜噜狠狠| 久久99久久99| 一本到高清视频免费精品| 欧美精品一卡二卡| 久久久综合视频| 亚洲国产成人精品视频| 九九精品一区二区| 91久久精品一区二区三区| 欧美成人猛片aaaaaaa| 亚洲伦理在线精品| 精彩视频一区二区三区| 欧美视频中文字幕| 中文字幕乱码亚洲精品一区 | 自拍偷在线精品自拍偷无码专区| 亚洲成av人片一区二区梦乃| 国产九色精品成人porny | 久久蜜桃av一区精品变态类天堂| 亚洲视频1区2区| 国产美女av一区二区三区| 欧美日韩国产一区| 中文字幕亚洲欧美在线不卡| 另类小说综合欧美亚洲|