Mercurial > hg > octave-lyh
comparison scripts/statistics/base/std.m @ 7411:83a8781b529d
[project @ 2008-01-22 21:52:25 by jwe]
author | jwe |
---|---|
date | Tue, 22 Jan 2008 21:52:26 +0000 |
parents | a1dbe9d80eee |
children | cadc73247d65 |
comparison
equal
deleted
inserted
replaced
7410:8a3b2ccc4e11 | 7411:83a8781b529d |
---|---|
88 else | 88 else |
89 error ("std: invalid matrix argument"); | 89 error ("std: invalid matrix argument"); |
90 endif | 90 endif |
91 | 91 |
92 endfunction | 92 endfunction |
93 | |
94 %!test | |
95 %! x = ones (10, 2); | |
96 %! y = [1, 3]; | |
97 %! assert(std (x) == [0, 0] && abs (std (y) - sqrt (2)) < sqrt (eps)); | |
98 | |
99 %!error std (); | |
100 | |
101 %!error std (1, 2, 3, 4); | |
102 |