From bug-request at octave dot org Wed Nov 23 10:54:55 2005 Subject: Re: weibull functions From: Ben Barrowes To: "John W. Eaton" Cc: bug at octave dot org Date: Wed, 23 Nov 2005 11:18:28 -0500 On Wednesday 23 November 2005 10:10 am, you wrote: > On 23-Nov-2005, Ben Barrowes wrote: > > | octave's weibpdf.m has inputs switched from ML's weibpdf.m (now > | renamed wblpdf.m). > > | octave's weibcdf.m and weibinv.m (now wblcdf.m and wblinv.min ML) > | also has the inputs switched: > > | I assume weibrnd.m has its inputs switched as well: > > > Shouldn't we also adopt the new names? Did Matlab ever have the > weibpdf, weibcdf, or weibrnd function names? If not, then we can drop > those. If it did, then should we care about compatibility for those > function names? > > jwe > > ML did have weib*** naming, but has recently (R14SP3?) changed (again). To my knowledge, only the weibull set has changed, weib => wbl. For compatibility, we should change the names, perhaps putting a wrapper for weib*** that calls wbl*** into deprecated. e.g. for weibpdf.m in deprecated ## Copyright (C) 1995, 1996, 1997 Kurt Hornik ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ## 02110-1301, USA. ## -*- texinfo -*- ## at deftypefn {Function File} {} weibpdf (@var{x}, @var{alpha}, @var{sigma}) ## ## This function has been deprecated. Use wblpdf instead. ## ## Compute the probability density function (PDF) at at var{x} of the ## Weibull distribution with shape parameter at var{alpha} and scale ## parameter at var{sigma} which is given by ## ## at example ## alpha * sigma^(-alpha) * x^(alpha-1) * exp(-(x/sigma)^alpha) ## at end example ## ## at noindent ## for at var{x} > 0. ## at end deftypefn ## Author: KH ## Description: PDF of the Weibull distribution function pdf = weibpdf (varargin) pdf = wblpdf (varargin{:}); endfunction weibcdf.m in deprecated ## Copyright (C) 1995, 1996, 1997 Kurt Hornik ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ## 02110-1301, USA. ## -*- texinfo -*- ## at deftypefn {Function File} {} weibcdf (@var{x}, @var{alpha}, @var{sigma}) ## ## This function has been deprecated. Use wblcdf instead. ## ## Compute the cumulative distribution function (CDF) at at var{x} of the ## Weibull distribution with shape parameter at var{alpha} and scale ## parameter at var{sigma}, which is ## ## at example ## 1 - exp(-(x/sigma)^alpha) ## at end example ## ## at noindent ## for at var{x} >= 0. ## at end deftypefn ## Author: KH ## Description: CDF of the Weibull distribution function cdf = weibcdf (varargin) cdf = wblcdf (varargin{:}); endfunction weibinv.m in deprecated ## Copyright (C) 1995, 1996, 1997 Kurt Hornik ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ## 02110-1301, USA. ## -*- texinfo -*- ## at deftypefn {Function File} {} weibinv (@var{x}, @var{lambda}, @var{alpha}) ## ## This function has been deprecated. Use wblinv instead. ## ## Compute the quantile (the inverse of the CDF) at at var{x} of the ## Weibull distribution with shape parameter at var{alpha} and scale ## parameter at var{sigma} dot ## at end deftypefn ## Author: KH ## Description: Quantile function of the Weibull distribution function inv = weibinv (varargin) inv = wblinv (varargin{:}); endfunction and weibrnd.m in deprecated ## Copyright (C) 1995, 1996, 1997 Kurt Hornik ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ## 02110-1301, USA. ## -*- texinfo -*- ## at deftypefn {Function File} {} weibrnd (@var{alpha}, @var{sigma}, @var{r}, @var{c}) ## at deftypefnx {Function File} {} weibrnd (@var{alpha}, @var{sigma}, @var{sz}) ## ## This function has been deprecated. Use wblrnd instead. ## ## Return an at var{r} by @var{c} matrix of random samples from the ## Weibull distribution with parameters at var{alpha} and @var{sigma} ## which must be scalar or of size at var{r} by @var{c}. Or if @var{sz} ## is a vector return a matrix of size at var{sz} dot ## ## If at var{r} and @var{c} are omitted, the size of the result matrix is ## the common size of at var{alpha} and @var{sigma}. ## at end deftypefn ## Author: KH ## Description: Random deviates from the Weibull distribution function rnd = weibrnd (varargin) rnd = wblrnd(varargin{:}); endfunction bb ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------