comparison scripts/statistics/tests/t_test_2.m @ 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 a1dbe9d80eee
children 1740012184f9
comparison
equal deleted inserted replaced
10605:1834132fb50b 10606:ec34c7acd057
57 df = n_x + n_y - 2; 57 df = n_x + n_y - 2;
58 mu_x = sum (x) / n_x; 58 mu_x = sum (x) / n_x;
59 mu_y = sum (y) / n_y; 59 mu_y = sum (y) / n_y;
60 v = sumsq (x - mu_x) + sumsq (y - mu_y); 60 v = sumsq (x - mu_x) + sumsq (y - mu_y);
61 t = (mu_x - mu_y) * sqrt ((n_x * n_y * df) / (v * (n_x + n_y))); 61 t = (mu_x - mu_y) * sqrt ((n_x * n_y * df) / (v * (n_x + n_y)));
62 cdf = t_cdf (t, df); 62 cdf = tcdf (t, df);
63 63
64 if (nargin == 2) 64 if (nargin == 2)
65 alt = "!="; 65 alt = "!=";
66 endif 66 endif
67 67