Home > wafo > trgauss > private > rqlf_asympt.m

rqlf_asympt

PURPOSE ^

Gives first two terms in an asymptotic expansion of the

SYNOPSIS ^

[Cb0,Cb1,a0,a1]=rqlf_asympt(u,g,b,S22,S21)

DESCRIPTION ^

  RQLF_ASYMPT Gives first two terms in an asymptotic expansion of the 
  crossing rate of a quadratic+linear 
  
    CALL:  [Cb0,Cb1,a0,a1] = rqlf_asympt(u,g,b,S22,S12); 
  
  A function that gives the two first terms 
  in an asymptotic expansion of the rate of crossings of a 
  quadratic+linear form according to Breitung's method

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function [Cb0,Cb1,a0,a1]=rqlf_asympt(u,g,b,S22,S21) 
002 % RQLF_ASYMPT Gives first two terms in an asymptotic expansion of the 
003 % crossing rate of a quadratic+linear 
004 % 
005 %   CALL:  [Cb0,Cb1,a0,a1] = rqlf_asympt(u,g,b,S22,S12); 
006 % 
007 % A function that gives the two first terms 
008 % in an asymptotic expansion of the rate of crossings of a 
009 % quadratic+linear form according to Breitung's method 
010  
011  
012 g=g(:); 
013 b=b(:); 
014  
015 if length(g)~=length(b) 
016    error('The lengths of b and g should be the same.') 
017 end 
018 %if u<=0; 
019 %   error('u should be a positive number.') 
020 %end 
021 n=size(S22,1); 
022 xtp=mindist(g,b,u,20); 
023 xJ=xtp(:); 
024 b0=sqrt(sum(xJ.^2)); 
025 yJ=xJ/b0; 
026 PJ=eye(n)-yJ*yJ'; 
027 dg=-b0*(b+2*(g.*xJ)); 
028 GJ=-2*b0^2*diag(g)/sqrt(sum(dg.^2)); 
029 V=S22+S21*S21; 
030 sJ2=yJ'*V*yJ; 
031 sJ=sqrt(sJ2); 
032 a0=sJ*sqrt(1-yJ'*S21*(eye(n)+GJ)*S21*yJ/sJ2)/sqrt(det(eye(n)+ ... 
033                           PJ*GJ*PJ)); 
034 aJ=-1/sJ*PJ*(eye(n)+GJ)*S21*yJ; 
035 WJ1=inv(eye(n)+PJ*GJ*PJ+aJ*a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,aJ,QJ1,QJ1)+1/8*holmberg3(WJ2,aJ,aJ,vJ2*vJ2',QJ1,QJ1); 
057 [det(WJ1) det(WJ2) sJ a11 a12]; 
058 a1=sJ*(sqrt(det(WJ1)*a11)+sqrt(det(WJ2))*a12); 
059 Cb0=a0*exp(-b0^2/2)/pi; 
060 Cb1=a1*exp(-b0^2/2)/pi/b0^2; 
061  
062  
063  
064  
065  
066  
067  
068

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003