# HG changeset patch # User jwe # Date 1128446251 0 # Node ID 6bbfc37975d2d28aafa292d547251c7cbf681142 # Parent 65e02518f4f5880e2597bb635d7d2c091bfde328 [project @ 2005-10-04 17:17:21 by jwe] diff -r 65e02518f4f5 -r 6bbfc37975d2 scripts/ChangeLog --- a/scripts/ChangeLog Tue Oct 04 17:12:08 2005 +0000 +++ b/scripts/ChangeLog Tue Oct 04 17:17:31 2005 +0000 @@ -1,3 +1,10 @@ +2005-10-04 Rafael Laboissiere + + * binoinv.m, chi2pdf.m, frnd.m, poissinv.m, tinv.m, trnd.m, + weibrnd.m: Removed calls and references to deprecated _pdf and + _inv functions. + * chi2pdf.m: Fixed typos in the documentation. + 2005-09-28 John W. Eaton * miscellaneous/single.m: New function. diff -r 65e02518f4f5 -r 6bbfc37975d2 scripts/statistics/distributions/binoinv.m --- a/scripts/statistics/distributions/binoinv.m Tue Oct 04 17:12:08 2005 +0000 +++ b/scripts/statistics/distributions/binoinv.m Tue Oct 04 17:17:31 2005 +0000 @@ -63,7 +63,7 @@ endif endwhile else - cdf = binomial_pdf (0, n(k), p(k)); + cdf = binopdf (0, n(k), p(k)); while (any (inv(k) < n(k))) m = find (cdf < x(k)); if (any (m)) diff -r 65e02518f4f5 -r 6bbfc37975d2 scripts/statistics/distributions/chi2pdf.m --- a/scripts/statistics/distributions/chi2pdf.m Tue Oct 04 17:12:08 2005 +0000 +++ b/scripts/statistics/distributions/chi2pdf.m Tue Oct 04 17:17:31 2005 +0000 @@ -20,26 +20,26 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} chisquare_pdf (@var{x}, @var{n}) ## For each element of @var{x}, compute the probability density function -## (PDF) at @var{x} of the chisquare distribution with @var{k} degrees +## (PDF) at @var{x} of the chisquare distribution with @var{n} degrees ## of freedom. ## @end deftypefn ## Author: TT -## Description: PDF of the chi-sqaure distribution +## Description: PDF of the chi-square distribution -function pdf = chisquare_pdf (x, n) +function pdf = chi2pdf (x, n) if (nargin != 2) - usage ("chisquare_pdf (x, n)"); + usage ("chi2pdf (x, n)"); endif if (!isscalar (n)) [retval, x, n] = common_size (x, n); if (retval > 0) - error ("chisquare_pdf: x and n must be of common size or scalar"); + error ("chi2pdf: x and n must be of common size or scalar"); endif endif - pdf = gamma_pdf (x, n / 2, 1 / 2); + pdf = gampdf (x, n / 2, 1 / 2); endfunction diff -r 65e02518f4f5 -r 6bbfc37975d2 scripts/statistics/distributions/frnd.m --- a/scripts/statistics/distributions/frnd.m Tue Oct 04 17:12:08 2005 +0000 +++ b/scripts/statistics/distributions/frnd.m Tue Oct 04 17:17:31 2005 +0000 @@ -80,7 +80,7 @@ if (isscalar (m) && isscalar (n)) if ((m > 0) && (m < Inf) && (n > 0) && (n < Inf)) - rnd = f_inv (rand (sz), m, n); + rnd = finv (rand (sz), m, n); else rnd = NaN * ones (sz); endif diff -r 65e02518f4f5 -r 6bbfc37975d2 scripts/statistics/distributions/poissinv.m --- a/scripts/statistics/distributions/poissinv.m Tue Oct 04 17:12:08 2005 +0000 +++ b/scripts/statistics/distributions/poissinv.m Tue Oct 04 17:17:31 2005 +0000 @@ -64,9 +64,9 @@ if (any (m)) inv(k(m)) = inv(k(m)) + 1; if (isscalar (l)) - cdf(m) = cdf(m) + poisson_pdf (inv(k(m)), l); + cdf(m) = cdf(m) + poisspdf (inv(k(m)), l); else - cdf(m) = cdf(m) + poisson_pdf (inv(k(m)), l(k(m))); + cdf(m) = cdf(m) + poisspdf (inv(k(m)), l(k(m))); endif else break; diff -r 65e02518f4f5 -r 6bbfc37975d2 scripts/statistics/distributions/tinv.m --- a/scripts/statistics/distributions/tinv.m Tue Oct 04 17:12:08 2005 +0000 +++ b/scripts/statistics/distributions/tinv.m Tue Oct 04 17:17:31 2005 +0000 @@ -65,11 +65,11 @@ if (any (k)) if (isscalar (n)) inv(k) = (sign (x(k) - 1/2) - .* sqrt (n .* (1 ./ beta_inv (2*min (x(k), 1 - x(k)), + .* sqrt (n .* (1 ./ betainv (2*min (x(k), 1 - x(k)), n/2, 1/2) - 1))); else inv(k) = (sign (x(k) - 1/2) - .* sqrt (n(k) .* (1 ./ beta_inv (2*min (x(k), 1 - x(k)), + .* sqrt (n(k) .* (1 ./ betainv (2*min (x(k), 1 - x(k)), n(k)/2, 1/2) - 1))); endif endif diff -r 65e02518f4f5 -r 6bbfc37975d2 scripts/statistics/distributions/trnd.m --- a/scripts/statistics/distributions/trnd.m Tue Oct 04 17:12:08 2005 +0000 +++ b/scripts/statistics/distributions/trnd.m Tue Oct 04 17:17:31 2005 +0000 @@ -70,7 +70,7 @@ if (!(n > 0) || !(n < Inf)) rnd = NaN * ones (sz); elseif ((n > 0) && (n < Inf)) - rnd = t_inv (rand (sz), n); + rnd = tinv (rand (sz), n); else rnd = zeros (size (n)); endif @@ -84,7 +84,7 @@ k = find ((n > 0) & (n < Inf)); if (any (k)) - rnd(k) = t_inv (rand (size (k)), n(k)); + rnd(k) = tinv (rand (size (k)), n(k)); endif endif diff -r 65e02518f4f5 -r 6bbfc37975d2 scripts/statistics/distributions/weibrnd.m --- a/scripts/statistics/distributions/weibrnd.m Tue Oct 04 17:12:08 2005 +0000 +++ b/scripts/statistics/distributions/weibrnd.m Tue Oct 04 17:17:31 2005 +0000 @@ -55,7 +55,7 @@ if (any (size (scale) != 1) && ((length (size (scale)) != length (sz)) || any (size (scale) != sz))) - error ("weilbull_rnd: shape and scale must be scalar or of size [r, c]"); + error ("weibrnd: shape and scale must be scalar or of size [r, c]"); endif elseif (nargin == 3) if (isscalar (r) && (r > 0))