Mercurial > hg > octave-lyh
comparison scripts/statistics/distributions/stdnormal_rnd.m @ 6046:34f96dd5441b
[project @ 2006-10-10 16:10:25 by jwe]
author | jwe |
---|---|
date | Tue, 10 Oct 2006 16:10:31 +0000 |
parents | 2a16423e4aa0 |
children | 6304d9ea0a30 |
comparison
equal
deleted
inserted
replaced
6045:421d8a903df7 | 6046:34f96dd5441b |
---|---|
28 ## Description: Random deviates from the standard normal distribution | 28 ## Description: Random deviates from the standard normal distribution |
29 | 29 |
30 function rnd = stdnormal_rnd (r, c) | 30 function rnd = stdnormal_rnd (r, c) |
31 | 31 |
32 if (nargin != 1 && nargin != 2) | 32 if (nargin != 1 && nargin != 2) |
33 usage ("stdnormal_rnd (r, c)"); | 33 print_usage (); |
34 endif | 34 endif |
35 | 35 |
36 if (nargin == 2) | 36 if (nargin == 2) |
37 if (! (isscalar (r) && (r > 0) && (r == round (r)))) | 37 if (! (isscalar (r) && (r > 0) && (r == round (r)))) |
38 error ("stdnormal_rnd: r must be a positive integer"); | 38 error ("stdnormal_rnd: r must be a positive integer"); |