Mercurial > hg > octave-lyh
diff scripts/statistics/tests/hotelling_test_2.m @ 3456:434790acb067
[project @ 2000-01-19 06:58:51 by jwe]
author | jwe |
---|---|
date | Wed, 19 Jan 2000 06:59:23 +0000 |
parents | d8b731d3f7a3 |
children | d25bc039237b |
line wrap: on
line diff
--- a/scripts/statistics/tests/hotelling_test_2.m +++ b/scripts/statistics/tests/hotelling_test_2.m @@ -37,8 +37,8 @@ ## If no output argument is given, the p-value of the test is displayed. ## @end deftypefn -## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> -## Description: Compare means of two multivariate normals +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Description: Compare means of two multivariate normals function [pval, Tsq] = hotelling_test_2 (x, y) @@ -49,7 +49,7 @@ if (is_vector (x)) n_x = length (x); if (! is_vector (y)) - error ("hotelling_test_2: If x is a vector, y must be too."); + error ("hotelling_test_2: If x is a vector, y must be too."); else n_y = length (y); p = 1; @@ -58,11 +58,10 @@ [n_x, p] = size (x); [n_y, q] = size (y); if (p != q) - error (strcat ("hotelling_test_2: ", - "x and y must have the same number of columns")); + error ("hotelling_test_2: x and y must have the same number of columns"); endif else - error ("hotelling_test_2: x and y must be matrices (or vectors)"); + error ("hotelling_test_2: x and y must be matrices (or vectors)"); endif d = mean (x) - mean (y); @@ -72,7 +71,7 @@ p, n_x + n_y - p - 1); if (nargout == 0) - printf (" pval: %g\n", pval); + printf (" pval: %g\n", pval); endif endfunction \ No newline at end of file