Home > wafo > wavemodels > tay90fun.m

tay90fun

PURPOSE ^

is an internal integrand function to tay90pdf

SYNOPSIS ^

y=tay90fun(u,x,b,pdfstr )

DESCRIPTION ^

 TAY90FUN is an internal integrand function to tay90pdf
 
   Call:  y = tay90fun(u,x,b)
 
     u = integration variable
     x = normalized waveheight
     b = correlation coefficient, i.e.,  cov(At^2,Ac^2)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function y=tay90fun(u,x,b,pdfstr )
002 %TAY90FUN is an internal integrand function to tay90pdf
003 %
004 %  Call:  y = tay90fun(u,x,b)
005 %
006 %    u = integration variable
007 %    x = normalized waveheight
008 %    b = correlation coefficient, i.e.,  cov(At^2,Ac^2)
009 %    
010 
011 %k=find(~isreal(u))
012 %k=find(~isreal(x))
013 %k=find(~isreal(a))
014 %k=find(~isreal(b))
015 if nargin<4|isempty(pdfstr)
016   pdfstr='pdf';
017 end
018 %pdf=strcmp(pdfstr,'pdf');
019 A=0.25./(1-b.^2);
020 [y ierr] =besseli(0,u.*x.^2.*b.*A,1);
021 switch ierr(1),
022   case 0, %computation OK
023   case 1, error('Illegal arguments.')
024   case 2, error('Overflow.  Return Inf.')
025   case 3, disp('Some loss of accuracy in argument reduction.')
026   case 4, error('Complete loss of accuracy, z or nu too large.')
027   case 5, error('No convergence.  Return NaN.')
028 end
029 
030 
031 y=sqrt(u)/2.*x.^3.*A.*exp(-A.*x.^2.*(2-u-abs(u.*b)) ).*y;
032 
033 %y=sqrt(u)/2.*x.^3./(1-b.^2).*exp(-x.^2./(1-b.^2).*(1-u/2-abs(real(u.*b/2)))).*y;%/0.73263369802690;
034    return
035

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