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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? glstat.m

?? 關(guān)于高階累積量分析的Matlab函數(shù)
?? 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-98 by United Signals & Systems, Inc. and The MathWorks, 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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产精品99精品国产| 色综合天天综合色综合av| 国产九九视频一区二区三区| 91影院在线观看| 欧美丰满一区二区免费视频| 日本一区二区三区四区在线视频| 亚洲国产va精品久久久不卡综合| 国产成人av一区二区| 欧美日韩一区二区三区四区| 国产午夜精品在线观看| 日韩精品电影在线观看| 91欧美一区二区| 日韩精品一区二区三区视频在线观看| 国产精品传媒入口麻豆| 看电影不卡的网站| 欧美视频三区在线播放| 综合中文字幕亚洲| 激情另类小说区图片区视频区| 欧美中文字幕一区| 国产嫩草影院久久久久| 青青草精品视频| 欧美日韩国产一级| 一区二区三区精品在线观看| 成人黄页在线观看| 久久理论电影网| 美女视频第一区二区三区免费观看网站| 一本在线高清不卡dvd| 国产欧美精品区一区二区三区 | 麻豆成人91精品二区三区| 一本久久精品一区二区| 中文字幕国产一区| 国产激情一区二区三区四区 | 国产在线精品视频| 日韩一区二区在线免费观看| 性感美女极品91精品| 欧日韩精品视频| 一区二区三区四区亚洲| 91在线porny国产在线看| 中文字幕中文乱码欧美一区二区| 国产精一区二区三区| 久久日一线二线三线suv| 久久成人18免费观看| 欧美一区二区观看视频| 天天做天天摸天天爽国产一区| 在线观看成人小视频| √…a在线天堂一区| www.av亚洲| 中文字幕日韩av资源站| 99riav久久精品riav| 亚洲蜜臀av乱码久久精品| av男人天堂一区| 亚洲欧美日韩精品久久久久| 99久久夜色精品国产网站| 亚洲男人天堂av| 欧美日韩中字一区| 青青草91视频| 久久综合五月天婷婷伊人| 国产v综合v亚洲欧| 亚洲欧洲国产日韩| 欧美性大战xxxxx久久久| 日韩中文字幕区一区有砖一区 | 亚洲免费三区一区二区| 色婷婷精品大在线视频| 婷婷久久综合九色国产成人| 日韩欧美视频在线| 成人看片黄a免费看在线| 亚洲综合激情小说| 欧美r级在线观看| 本田岬高潮一区二区三区| 亚洲第一激情av| 精品sm在线观看| 91丨九色丨蝌蚪丨老版| 日韩av中文在线观看| 国产亚洲一区字幕| 色呦呦日韩精品| 老司机一区二区| 亚洲免费视频成人| 精品99久久久久久| 色素色在线综合| 激情综合色综合久久综合| 亚洲人成影院在线观看| 日韩欧美黄色影院| 97精品久久久久中文字幕| 蜜臀99久久精品久久久久久软件| 国产精品久久久一区麻豆最新章节| 欧美少妇xxx| 成年人国产精品| 免费人成在线不卡| 亚洲免费av在线| 久久精品视频在线看| 欧美日韩成人在线一区| 不卡一区在线观看| 久色婷婷小香蕉久久| 夜夜夜精品看看| 国产精品三级av| 欧美tk—视频vk| 337p亚洲精品色噜噜狠狠| 不卡在线观看av| 国产精品一区二区久激情瑜伽| 亚洲电影视频在线| 综合色天天鬼久久鬼色| 久久综合狠狠综合久久综合88| 欧美性色欧美a在线播放| 成人黄色免费短视频| 久久国产精品72免费观看| 午夜视频久久久久久| 亚洲免费在线视频一区 二区| 久久久五月婷婷| 欧美变态tickling挠脚心| 欧美日本一区二区在线观看| 91网站最新地址| 成人午夜在线免费| 国产成人在线视频网站| 精品制服美女丁香| 日韩av成人高清| 日韩综合在线视频| 午夜精品一区在线观看| 亚洲一区二区美女| 亚洲人成小说网站色在线| 亚洲色欲色欲www| 中文字幕一区二区三区不卡| 中文字幕乱码亚洲精品一区| 国产日产欧美一区二区三区 | 91免费观看视频在线| av在线播放一区二区三区| 成人深夜在线观看| 不卡av在线免费观看| 99精品视频在线免费观看| av电影在线观看完整版一区二区| 国产激情一区二区三区桃花岛亚洲| 激情图区综合网| 国产精品一卡二| 高潮精品一区videoshd| 丁香婷婷综合网| 91麻豆国产自产在线观看| 日本韩国欧美在线| 在线播放欧美女士性生活| 91精品中文字幕一区二区三区| 欧美一区午夜视频在线观看| 亚洲精品一区二区三区精华液| 2021久久国产精品不只是精品| 欧美激情中文不卡| 国产精品久久久久aaaa樱花| 亚洲手机成人高清视频| 亚洲综合久久久| 美国毛片一区二区| 国产成人精品影视| 91黄色免费版| 欧美一区二区三区免费| 久久精品综合网| 国产精品传媒视频| 天天综合网 天天综合色| 日韩高清一级片| 国内外成人在线视频| 成人高清免费观看| 在线观看日韩电影| 欧美mv和日韩mv的网站| 国产精品三级电影| 午夜精品福利久久久| 国产超碰在线一区| 欧美主播一区二区三区| 精品免费国产一区二区三区四区| 国产精品久久久久久亚洲毛片 | 国产精品一区在线观看你懂的| 北条麻妃一区二区三区| 欧美日韩电影一区| 久久精品视频一区| 婷婷中文字幕一区三区| 成人福利视频在线看| 欧美一二区视频| 亚洲天堂成人在线观看| 黄色资源网久久资源365| 一本久久a久久免费精品不卡| 91精品国产aⅴ一区二区| 国产精品成人在线观看| 久久精品久久久精品美女| 色视频一区二区| 国产欧美精品一区二区色综合朱莉 | youjizz久久| 在线不卡中文字幕| 亚洲日本电影在线| 国模一区二区三区白浆| 欧美日韩国产另类一区| 亚洲精品视频一区| 国产精品亚洲一区二区三区妖精| 欧美精品视频www在线观看 | 国产精品久久久一本精品 | 国产精品一区二区黑丝| 337p亚洲精品色噜噜| 怡红院av一区二区三区| 成人激情视频网站| 久久综合国产精品| 久久99久久精品欧美| 欧美精品乱码久久久久久| 亚洲日本乱码在线观看| 不卡一区二区在线| 欧美激情一区二区三区在线| 国产精品一区不卡| 久久精品人人做人人爽人人| 激情文学综合网|