changeset 5482:6bbfc37975d2

[project @ 2005-10-04 17:17:21 by jwe]
author jwe
date Tue, 04 Oct 2005 17:17:31 +0000
parents 65e02518f4f5
children d2df058c4319
files scripts/ChangeLog scripts/statistics/distributions/binoinv.m scripts/statistics/distributions/chi2pdf.m scripts/statistics/distributions/frnd.m scripts/statistics/distributions/poissinv.m scripts/statistics/distributions/tinv.m scripts/statistics/distributions/trnd.m scripts/statistics/distributions/weibrnd.m
diffstat 8 files changed, 22 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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  <rafael@debian.org>
+
+	* 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  <jwe@octave.org>
 
 	* miscellaneous/single.m: New function.
--- 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))
--- 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 <Teresa.Twaroch@ci.tuwien.ac.at>
-## 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
--- 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
--- 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;
--- 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
--- 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
 
--- 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))