WLOGNCDF Lognormal cumulative distribution function CALL: F = wlogncdf(x,m,s); F = distribution function evaluated at x m,v =parameters The Lognormal distribution is defined by its pdf f(x)=(v*2*pi*x^2)^(-1)*exp(-(log(x)-m)^2/(2*v)), x>=0. Example: x = linspace(0,6,200); p1 = wlogncdf(x,0,1); p2 = wlogncdf(x,.5,0.25); plot(x,p1,x,p2)
Check if all input arguments are either scalar or of common size. | |
Normal cumulative distribution function | |
Display message and abort function. |
Joint 2D CDF computed as int F(X1 | |
is an internal function to dist2dcdf dist2dprb. | |
Long Term Wave Climate PDF of significant wave height and wave period | |
Joint 2D CDF due to Plackett | |
Joint 2D PDF due to Plackett given as f{x1}*f{x2}*G(x1,x2;Psi). | |
Myrhaug and Kjeldsen (1987) joint (Scf,Hd) PDF. | |
Parameter estimates for Lognormal data. |
001 function F = wlogncdf(x,m,v); 002 %WLOGNCDF Lognormal cumulative distribution function 003 % 004 % CALL: F = wlogncdf(x,m,s); 005 % 006 % F = distribution function evaluated at x 007 % m,v =parameters 008 % 009 % The Lognormal distribution is defined by its pdf 010 % 011 % f(x)=(v*2*pi*x^2)^(-1)*exp(-(log(x)-m)^2/(2*v)), x>=0. 012 % 013 % Example: 014 % x = linspace(0,6,200); 015 % p1 = wlogncdf(x,0,1); p2 = wlogncdf(x,.5,0.25); 016 % plot(x,p1,x,p2) 017 018 % Reference: Cohen & Whittle, (1988) "Parameter Estimation in Reliability 019 % and Life Span Models", p. 59 ff, Marcel Dekker. 020 021 022 023 % Tested on; Matlab 5.3 024 % History: 025 % revised pab 24.10.2000 026 % - added comnsize, nargchk 027 % - added default values 028 % added ms 10.08.2000 029 030 error(nargchk(1,3,nargin)) 031 if nargin<2|isempty(m), m=0; end 032 if nargin<3|isempty(v), v=1; end 033 034 [errorcode, x, m, v] = comnsize (x,m, v); 035 if (errorcode > 0) 036 error ('x, m and v must be of common size or scalar'); 037 end 038 F=zeros(size(x)); 039 k=find(x>0); % avoid log(0) 040 if any(k) 041 F(k)=wnormcdf(log(x(k)),m(k),v(k)); 042 end 043 044
Comments or corrections to the WAFO group