From bug-octave-request at bevo dot che dot wisc dot edu Mon Jan 24 12:20:18 2000 Subject: sign error in `weibull_pdf.m' From: Cyril Humbert To: bug-octave at bevo dot che dot wisc dot edu Date: Mon, 24 Jan 2000 12:20:36 -0600 (CST) ------- start of forwarded message ------- 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 ----------------------------------------------------------------------- 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 -----------------------------------------------------------------------