Home > wafo > wstats > wlogninv.m

# wlogninv

## PURPOSE

Inverse of the Lognormal distribution function

## SYNOPSIS

x = wlogninv(F,m,v)

## DESCRIPTION

``` WLOGNINV Inverse of the Lognormal distribution function

CALL:  x = wlogninv(F,m,v)

x = inverse cdf for the Lognormal distribution evaluated at F
m,v = parameters     (default 0 and 1, respectively)

Example:
F = linspace(0,1,100);
x = wlogninv(F,0,1);
plot(F,x)```

## CROSS-REFERENCE INFORMATION

This function calls:
 comnsize Check if all input arguments are either scalar or of common size. wnorminv Inverse of the Normal distribution function error Display message and abort function.
This function is called by:
 mdist2dcinv Inverse of the conditional cdf of X2 given X1. winvginv Inverse of the Inverse Gaussian distribution function

## SOURCE CODE

```001 function x = wlogninv(F,m,v)
002 %WLOGNINV Inverse of the Lognormal distribution function
003 %
004 % CALL:  x = wlogninv(F,m,v)
005 %
006 %        x = inverse cdf for the Lognormal distribution evaluated at F
007 %      m,v = parameters     (default 0 and 1, respectively)
008 %
009 % Example:
010 %   F = linspace(0,1,100);
011 %   x = wlogninv(F,0,1);
012 %   plot(F,x)
013
014
015 % Reference: Cohen & Whittle, (1988) "Parameter Estimation in Reliability
016 % and Life Span Models", p. 59 ff, Marcel Dekker.
017
018
019 % Tested on; Matlab 5.3
020 % History:
021 % revised pab 24.10.2000
022 %  - added comnsize, nargchk
023 %  - added default values
024 %  - fixed a bug: the inversion was not correct
026
027 error(nargchk(1,3,nargin))
028 if nargin<2|isempty(m),  m=0;  end
029 if nargin<3|isempty(v),  v=1;  end
030
031 [errorcode, F, m, v] = comnsize (F,m, v);
032 if (errorcode > 0)
033   error ('F, m and v must be of common size or scalar');
034 end
035 x=exp(wnorminv(F,m,v));
036
037```

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