Mercurial > octave-nkf
comparison scripts/statistics/distributions/poissrnd.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 |
---|---|
49 if (isscalar (r) && (r > 0)) | 49 if (isscalar (r) && (r > 0)) |
50 sz = [r, r]; | 50 sz = [r, r]; |
51 elseif (isvector(r) && all (r > 0)) | 51 elseif (isvector(r) && all (r > 0)) |
52 sz = r(:)'; | 52 sz = r(:)'; |
53 else | 53 else |
54 error ("poissrnd: r must be a postive integer or vector"); | 54 error ("poissrnd: r must be a positive integer or vector"); |
55 endif | 55 endif |
56 | 56 |
57 if (any (size (l) != 1) && | 57 if (any (size (l) != 1) && |
58 ((length (size (l)) != length (sz)) || any (size (l) != sz))) | 58 ((length (size (l)) != length (sz)) || any (size (l) != sz))) |
59 error ("poissrnd: lambda must be scalar or of size sz"); | 59 error ("poissrnd: lambda must be scalar or of size sz"); |