From bug-octave-request at bevo dot che dot wisc dot edu Mon Jan 24 16:46:20 2000 Subject: sign error in `weibull_pdf.m' From: "John W. Eaton" To: Cyril Humbert cc: bug-octave at bevo dot che dot wisc dot edu Date: Mon, 24 Jan 2000 16:46:25 -0600 (CST) On 24-Jan-2000, Cyril Humbert wrote: | weibull_pdf(x, alpha, beta) should compute | | alpha * sigma^(-alpha) * x^(alpha-1) * exp(-(x/sigma)^alpha) | | but, in fact, it computes | | alpha * sigma^(+alpha) * x^(alpha-1) * exp(-(x/sigma)^alpha) | | | | --- 2.0.14/m/statistics/distributions/weibull_pdf.m~ Sun Sep 5 19:59:36 1999 | +++ 2.0.14/m/statistics/distributions/weibull_pdf.m Mon Jan 24 18:31:44 2000 | at @ -53,7 +53,7 @@ | | k = find ((x > 0) & (x < Inf) & ok); | if any (k) | - pdf(k) = (shape(k) .* (scale(k) .^ shape(k)) | + pdf(k) = (shape(k) .* (scale(k) .^ (-shape(k))) | .* (x(k) .^ (shape(k) - 1)) | .* exp(- (x(k) ./ scale(k)) .^ shape(k))); | endif I made this change in my sources. Thanks, jwe ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------