Mercurial > octave-nkf
comparison scripts/statistics/distributions/binornd.m @ 7007:6304d9ea0a30
[project @ 2007-10-11 16:26:36 by jwe]
author | jwe |
---|---|
date | Thu, 11 Oct 2007 16:26:37 +0000 |
parents | 34f96dd5441b |
children | 93c65f2a5668 |
comparison
equal
deleted
inserted
replaced
7006:039ef140ac35 | 7007:6304d9ea0a30 |
---|---|
60 if (isscalar (r) && (r > 0)) | 60 if (isscalar (r) && (r > 0)) |
61 sz = [r, r]; | 61 sz = [r, r]; |
62 elseif (isvector(r) && all (r > 0)) | 62 elseif (isvector(r) && all (r > 0)) |
63 sz = r(:)'; | 63 sz = r(:)'; |
64 else | 64 else |
65 error ("binornd: r must be a postive integer or vector"); | 65 error ("binornd: r must be a positive integer or vector"); |
66 endif | 66 endif |
67 | 67 |
68 if (any (size (n) != 1) | 68 if (any (size (n) != 1) |
69 && (length (size (n)) != length (sz) || any (size (n) != sz))) | 69 && (length (size (n)) != length (sz) || any (size (n) != sz))) |
70 error ("binornd: n and must be scalar or of size sz"); | 70 error ("binornd: n and must be scalar or of size sz"); |