Home > wafo > trgauss > lomaxcdf.m

lomaxcdf

PURPOSE ^

CDF for local maxima for a zero-mean Gaussian process

SYNOPSIS ^

F = lomaxcdf(x,alpha,m0)

DESCRIPTION ^

 LOMAXCDF CDF for local maxima for a zero-mean Gaussian process
  
  CALL:  F = lomaxcdf(x,alpha,m0)
 
        F     = distribution function evaluated at x
        alpha = irregularity factor 
        m0    = zero-order spectral moment (variance of the process)
 
 
  The cdf is calculated from an explicit expression involving the 
  standard-normal cdf. This relation is sometimes written as a convolution
 
        M = sqrt(m0)*( sqrt(1-a^2)*Z + a*R )
 
  where  M  denotes local maximum, Z  is a standard normal r.v.,  
  R  is a standard Rayleigh r.v., and "=" means equality in distribution.
 
  Note that all local maxima of the process are considered, not
  only crests of waves. 
  
  Example: 
   S     = jonswap(10);
   xs    = spec2sdat(S,10000);
   mM    = tp2mm(dat2tp(xs)); 
   m0    = spec2mom(S,1);  
   alpha = spec2char(S,'alpha');  
   x     = linspace(-10,10,200).';
   empdistr(mM(:,2),[x,lomaxcdf(x,alpha,m0)])
  
  See also  spec2mom, spec2bw

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function F = lomaxcdf(x,alpha,m0)
002 %LOMAXCDF CDF for local maxima for a zero-mean Gaussian process
003 % 
004 % CALL:  F = lomaxcdf(x,alpha,m0)
005 %
006 %       F     = distribution function evaluated at x
007 %       alpha = irregularity factor 
008 %       m0    = zero-order spectral moment (variance of the process)
009 %
010 %
011 % The cdf is calculated from an explicit expression involving the 
012 % standard-normal cdf. This relation is sometimes written as a convolution
013 %
014 %       M = sqrt(m0)*( sqrt(1-a^2)*Z + a*R )
015 %
016 % where  M  denotes local maximum, Z  is a standard normal r.v.,  
017 % R  is a standard Rayleigh r.v., and "=" means equality in distribution.
018 %
019 % Note that all local maxima of the process are considered, not
020 % only crests of waves. 
021 % 
022 % Example: 
023 %  S     = jonswap(10);
024 %  xs    = spec2sdat(S,10000);
025 %  mM    = tp2mm(dat2tp(xs)); 
026 %  m0    = spec2mom(S,1);  
027 %  alpha = spec2char(S,'alpha');  
028 %  x     = linspace(-10,10,200).';
029 %  empdistr(mM(:,2),[x,lomaxcdf(x,alpha,m0)])
030 % 
031 % See also  spec2mom, spec2bw
032 
033 % Tested on Matlab 6.0
034 % History: 
035 % Revised pab Feb2004  
036 % -extended example  
037 % By jr 31.03.2001
038   
039   error(nargchk(3,3,nargin))
040 c1 = 1/(sqrt(1-alpha^2))*x./sqrt(m0);
041 c2 = alpha*c1;
042 
043 F = wnormcdf(c1,0,1)-alpha*exp(-x.^2/2/m0).*wnormcdf(c2,0,1);
044

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