changeset 10606:ec34c7acd057

Replace deprecated function calls in statistics tests Patch provided by Alois Schlögl.
author Rik <octave@nomad.inbox5.com>
date Wed, 05 May 2010 21:14:18 -0700
parents 1834132fb50b
children f7501986e42d
files scripts/ChangeLog scripts/image/brighten.m scripts/statistics/tests/cor_test.m scripts/statistics/tests/t_test.m scripts/statistics/tests/t_test_2.m scripts/statistics/tests/t_test_regression.m scripts/statistics/tests/welch_test.m
diffstat 7 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Wed May 05 14:20:58 2010 -0400
+++ b/scripts/ChangeLog	Wed May 05 21:14:18 2010 -0700
@@ -1,3 +1,10 @@
+2010-05-05  Rik <octave@nomad.inbox5.com>
+
+        * statistics/tests/cor_test.m, statistics/tests/t_test.m, 
+          statistics/tests/t_test_2.m, statistics/tests/t_test_regression.m, 
+          statistics/tests/welch_test.m: Replace deprecated function calls.
+          Patch provided by Alois Schlögl.
+
 2010-05-02  Rik <octave@nomad.inbox5.com>
 
 	* linear-algebra/cond.m: Add TeX equation to documentation
--- a/scripts/image/brighten.m	Wed May 05 14:20:58 2010 -0400
+++ b/scripts/image/brighten.m	Wed May 05 21:14:18 2010 -0700
@@ -44,7 +44,7 @@
     if (ishandle (m))
       h = m;
       m = get (h, "colormap");
-    elseif (! is_matrix (m) || size (m, 2) != 3)
+    elseif (! ismatrix (m) || size (m, 2) != 3)
       error ("brighten: first argument must be an Nx3 matrix or a handle");
     endif
   else
--- a/scripts/statistics/tests/cor_test.m	Wed May 05 14:20:58 2010 -0400
+++ b/scripts/statistics/tests/cor_test.m	Wed May 05 21:14:18 2010 -0700
@@ -93,7 +93,7 @@
     t.params = df;
     t.stat = sqrt (df) .* r / sqrt (1 - r.^2);
     t.dist = "t";
-    cdf  = t_cdf (t.stat, df);
+    cdf  = tcdf (t.stat, df);
   elseif (m == "k")
     tau = kendall (X, Y);
     t.method = "Kendall's rank correlation tau";
--- a/scripts/statistics/tests/t_test.m	Wed May 05 14:20:58 2010 -0400
+++ b/scripts/statistics/tests/t_test.m	Wed May 05 21:14:18 2010 -0700
@@ -58,7 +58,7 @@
   n   = length (x);
   df  = n - 1;
   t   = sqrt (n) * (sum (x) / n - m) / std (x);
-  cdf = t_cdf (t, df);
+  cdf = tcdf (t, df);
 
   if (nargin == 2)
     alt  = "!=";
--- a/scripts/statistics/tests/t_test_2.m	Wed May 05 14:20:58 2010 -0400
+++ b/scripts/statistics/tests/t_test_2.m	Wed May 05 21:14:18 2010 -0700
@@ -59,7 +59,7 @@
   mu_y = sum (y) / n_y;
   v    = sumsq (x - mu_x) + sumsq (y - mu_y);
   t    = (mu_x - mu_y) * sqrt ((n_x * n_y * df) / (v * (n_x + n_y)));
-  cdf  = t_cdf (t, df);
+  cdf  = tcdf (t, df);
 
   if (nargin == 2)
     alt = "!=";
--- a/scripts/statistics/tests/t_test_regression.m	Wed May 05 14:20:58 2010 -0400
+++ b/scripts/statistics/tests/t_test_regression.m	Wed May 05 21:14:18 2010 -0700
@@ -78,7 +78,7 @@
   [b, v] = ols (y, X);
   df     = T - k;
   t      = (R * b - r) / sqrt (v * R * inv (X' * X) * R');
-  cdf    = t_cdf (t, df);
+  cdf    = tcdf (t, df);
 
   if (strcmp (alt, "!=") || strcmp (alt, "<>"))
     pval = 2 * min (cdf, 1 - cdf);
--- a/scripts/statistics/tests/welch_test.m	Wed May 05 14:20:58 2010 -0400
+++ b/scripts/statistics/tests/welch_test.m	Wed May 05 21:14:18 2010 -0700
@@ -60,7 +60,7 @@
   c    = v_x / (v_x + v_y);
   df   = 1 / (c^2 / (n_x - 1) + (1 - c)^2 / (n_y - 1));
   t    = (mu_x - mu_y) / sqrt (v_x + v_y);
-  cdf  = t_cdf (t, df);
+  cdf  = tcdf (t, df);
 
   if (nargin == 2)
     alt  = "!=";