Mercurial > octave-nkf
comparison scripts/statistics/distributions/chi2rnd.m @ 7007:6304d9ea0a30
[project @ 2007-10-11 16:26:36 by jwe]
author | jwe |
---|---|
date | Thu, 11 Oct 2007 16:26:37 +0000 |
parents | 20c48710b2c7 |
children | 93c65f2a5668 |
comparison
equal
deleted
inserted
replaced
7006:039ef140ac35 | 7007:6304d9ea0a30 |
---|---|
50 if (isscalar (r) && (r > 0)) | 50 if (isscalar (r) && (r > 0)) |
51 sz = [r, r]; | 51 sz = [r, r]; |
52 elseif (isvector(r) && all (r > 0)) | 52 elseif (isvector(r) && all (r > 0)) |
53 sz = r(:)'; | 53 sz = r(:)'; |
54 else | 54 else |
55 error ("chi2rnd: r must be a postive integer or vector"); | 55 error ("chi2rnd: r must be a positive integer or vector"); |
56 endif | 56 endif |
57 | 57 |
58 if (any (size (n) != 1) | 58 if (any (size (n) != 1) |
59 && (length (size (n)) != length (sz) || any (size (n) != sz))) | 59 && (length (size (n)) != length (sz) || any (size (n) != sz))) |
60 error ("chi2rnd: n must be scalar or of size sz"); | 60 error ("chi2rnd: n must be scalar or of size sz"); |