comparison scripts/deprecated/weibull_inv.m @ 5693:446b28529300

[project @ 2006-03-17 18:16:03 by jwe]
author jwe
date Fri, 17 Mar 2006 18:16:03 +0000
parents 2a16423e4aa0
children 93c65f2a5668
comparison
equal deleted inserted replaced
5692:fe226f54d259 5693:446b28529300
1 ## Copyright (C) 1995, 1996, 1997 Kurt Hornik 1 ## Copyright (C) 2006 John W. Eaton
2 ## 2 ##
3 ## This file is part of Octave. 3 ## This file is part of Octave.
4 ## 4 ##
5 ## Octave is free software; you can redistribute it and/or modify it 5 ## Octave is free software; you can redistribute it and/or modify it
6 ## under the terms of the GNU General Public License as published by 6 ## under the terms of the GNU General Public License as published by
16 ## along with Octave; see the file COPYING. If not, write to the Free 16 ## along with Octave; see the file COPYING. If not, write to the Free
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 ## 02110-1301, USA. 18 ## 02110-1301, USA.
19 19
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {} weibull_inv (@var{x}, @var{lambda}, @var{alpha}) 21 ## @deftypefn {Function File} {} weibull_inv (@var{x}, @var{shape}, @var{scale})
22 ## Compute the quantile (the inverse of the CDF) at @var{x} of the 22 ## Compute the quantile (the inverse of the CDF) at @var{x} of the
23 ## Weibull distribution with shape parameter @var{alpha} and scale 23 ## Weibull distribution with shape parameter @var{scale} and scale
24 ## parameter @var{sigma}. 24 ## parameter @var{shape}.
25 ## @end deftypefn 25 ## @end deftypefn
26
27 ## Author: KH <Kurt.Hornik@wu-wien.ac.at>
28 ## Description: Quantile function of the Weibull distribution
29 26
30 function inv = weibull_inv (varargin) 27 function inv = weibull_inv (varargin)
31 28
32 inv = weibinv (varargin{:}); 29 if (nargin == 2)
30 varargin{3} = varargin{2};
31 varargin{2} = 1;
32 elseif (nargin > 2)
33 tmp = varargin{3};
34 varargin{3} = varargin{2};
35 varargin{2} = tmp;
36 endif
37
38 inv = wblinv (varargin{:});
33 39
34 endfunction 40 endfunction