Mercurial > octave-nkf
comparison scripts/statistics/tests/wilcoxon_test.m @ 6046:34f96dd5441b
[project @ 2006-10-10 16:10:25 by jwe]
author | jwe |
---|---|
date | Tue, 10 Oct 2006 16:10:31 +0000 |
parents | ec8c33dcd1bf |
children | 3933e0693fe0 |
comparison
equal
deleted
inserted
replaced
6045:421d8a903df7 | 6046:34f96dd5441b |
---|---|
41 ## Description: Wilcoxon signed-rank test | 41 ## Description: Wilcoxon signed-rank test |
42 | 42 |
43 function [pval, z] = wilcoxon_test (x, y, alt) | 43 function [pval, z] = wilcoxon_test (x, y, alt) |
44 | 44 |
45 if ((nargin < 2) || (nargin > 3)) | 45 if ((nargin < 2) || (nargin > 3)) |
46 usage ("[pval, z] = wilcoxon_test (x, y, alt)"); | 46 print_usage (); |
47 endif | 47 endif |
48 | 48 |
49 if (! (isvector (x) && isvector (y) && (length (x) == length (y)))) | 49 if (! (isvector (x) && isvector (y) && (length (x) == length (y)))) |
50 error ("wilcoxon_test: x and y must be vectors of the same length"); | 50 error ("wilcoxon_test: x and y must be vectors of the same length"); |
51 endif | 51 endif |