Mercurial > hg > octave-lyh
diff scripts/statistics/distributions/stdnormal_rnd.m @ 3456:434790acb067
[project @ 2000-01-19 06:58:51 by jwe]
author | jwe |
---|---|
date | Wed, 19 Jan 2000 06:59:23 +0000 |
parents | f8dde1807dee |
children | e031284eea27 |
line wrap: on
line diff
--- a/scripts/statistics/distributions/stdnormal_rnd.m +++ b/scripts/statistics/distributions/stdnormal_rnd.m @@ -14,13 +14,14 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: stdnormal_rnd (r, c) -## -## Return an r by c matrix of random numbers from the standard normal -## distribution. +## -*- texinfo -*- +## @deftypefn {Function File} {} stdnormal_rnd (@var{r}, @var{c}) +## Return an @var{r} by @var{c} matrix of random numbers from the +## standard normal distribution. +## @end deftypefn -## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> -## Description: Random deviates from the standard normal distribution +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Description: Random deviates from the standard normal distribution function rnd = stdnormal_rnd (r, c) @@ -28,11 +29,11 @@ usage ("stdnormal_rnd (r, c)"); endif - if ( !(is_scalar (r) && (r > 0) && (r == round (r))) ) - error ("stdnormal_rnd: r must be a positive integer"); + if (! (is_scalar (r) && (r > 0) && (r == round (r))) ) + error ("stdnormal_rnd: r must be a positive integer"); endif - if ( !(is_scalar (c) && (c > 0) && (c == round (c))) ) - error ("stdnormal_rnd: c must be a positive integer"); + if (! (is_scalar (c) && (c > 0) && (c == round (c))) ) + error ("stdnormal_rnd: c must be a positive integer"); endif rnd = randn (r, c);