Mercurial > octave-nkf
comparison scripts/statistics/distributions/stdnormal_rnd.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 |
---|---|
45 if (isscalar (r) && (r > 0)) | 45 if (isscalar (r) && (r > 0)) |
46 sz = [r, r]; | 46 sz = [r, r]; |
47 elseif (isvector(r) && all (r > 0)) | 47 elseif (isvector(r) && all (r > 0)) |
48 sz = r(:)'; | 48 sz = r(:)'; |
49 else | 49 else |
50 error ("stdnormal_rnd: r must be a postive integer or vector"); | 50 error ("stdnormal_rnd: r must be a positive integer or vector"); |
51 endif | 51 endif |
52 endif | 52 endif |
53 | 53 |
54 rnd = randn (sz); | 54 rnd = randn (sz); |
55 | 55 |