annotate scripts/deprecated/weibull_inv.m @ 7269:3fade00a6ac7

[project @ 2007-12-07 19:26:20 by jwe]
author jwe
date Fri, 07 Dec 2007 19:26:21 +0000
parents a1dbe9d80eee
children 8e5371d47da6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
1 ## Copyright (C) 2005, 2006, 2007 John W. Eaton
5411
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
2 ##
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
4 ##
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5693
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5693
diff changeset
8 ## your option) any later version.
5411
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
9 ##
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
13 ## General Public License for more details.
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
14 ##
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5693
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5693
diff changeset
17 ## <http://www.gnu.org/licenses/>.
5411
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
18
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
5693
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
20 ## @deftypefn {Function File} {} weibull_inv (@var{x}, @var{shape}, @var{scale})
5411
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
21 ## Compute the quantile (the inverse of the CDF) at @var{x} of the
5693
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
22 ## Weibull distribution with shape parameter @var{scale} and scale
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
23 ## parameter @var{shape}.
5411
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
24 ## @end deftypefn
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
25
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
26 function inv = weibull_inv (varargin)
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
27
5693
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
28 if (nargin == 2)
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
29 varargin{3} = varargin{2};
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
30 varargin{2} = 1;
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
31 elseif (nargin > 2)
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
32 tmp = varargin{3};
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
33 varargin{3} = varargin{2};
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
34 varargin{2} = tmp;
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
35 endif
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
36
446b28529300 [project @ 2006-03-17 18:16:03 by jwe]
jwe
parents: 5428
diff changeset
37 inv = wblinv (varargin{:});
5411
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
38
bee21f388110 [project @ 2005-07-13 17:53:44 by jwe]
jwe
parents:
diff changeset
39 endfunction