diff src/DLD-FUNCTIONS/rand.cc @ 3369:f37ca3017116

[project @ 1999-11-21 16:26:02 by jwe]
author jwe
date Sun, 21 Nov 1999 16:26:08 +0000
parents 2efa28a91e7a
children b80bbb43a1a9
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/rand.cc	Sat Nov 20 17:23:01 1999 +0000
+++ b/src/DLD-FUNCTIONS/rand.cc	Sun Nov 21 16:26:08 1999 +0000
@@ -331,15 +331,30 @@
 }
 
 DEFUN_DLD (rand, args, nargout,
-  "rand              -- generate a random value from a uniform distribution\n\
+  "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} rand (@var{x})\n\
+@deftypefnx {Loadable Function} {} rand (@var{n}, @var{m})\n\
+@deftypefnx {Loadable Function} {} rand (@code{\"seed\"}, @var{x})\n\
+Return a matrix with random elements uniformly distributed on the\n\
+interval (0, 1).  The arguments are handled the same as the arguments\n\
+for @code{eye}.  In\n\
+addition, you can set the seed for the random number generator using the\n\
+form\n\
 \n\
-rand (N)          -- generate N x N matrix\n\
-rand (size (A))   -- generate matrix the size of A\n\
-rand (N, M)       -- generate N x M matrix\n\
-rand (\"seed\")     -- get current seed\n\
-rand (\"seed\", N)  -- set seed\n\
+@example\n\
+rand (\"seed\", @var{x})\n\
+@end example\n\
+\n\
+@noindent\n\
+where @var{x} is a scalar value.  If called as\n\
 \n\
-See also: randn")
+@example\n\
+rand (\"seed\")\n\
+@end example\n\
+\n\
+@noindent\n\
+@code{rand} returns the current value of the seed.\n\
+@end deftypefn")
 {
   octave_value_list retval;
 
@@ -365,15 +380,29 @@
 }
 
 DEFUN_DLD (randn, args, nargout,
-  "randn              -- generate a random value from a normal distribution\n\
+  "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {} randn (@var{x})\n\
+@deftypefnx {Loadable Function} {} randn (@var{n}, @var{m})\n\
+@deftypefnx {Loadable Function} {} randn (@code{\"seed\"}, @var{x})\n\
+Return a matrix with normally distributed random elements.  The\n\
+arguments are handled the same as the arguments for @code{eye}.  In\n\
+addition, you can set the seed for the random number generator using the\n\
+form\n\
 \n\
-randn (N)          -- generate N x N matrix\n\
-randn (size (A))   -- generate matrix the size of A\n\
-randn (N, M)       -- generate N x M matrix\n\
-randn (\"seed\")     -- get current seed\n\
-randn (\"seed\", N)  -- set seed\n\
+@example\n\
+randn (\"seed\", @var{x})\n\
+@end example\n\
+\n\
+@noindent\n\
+where @var{x} is a scalar value.  If called as\n\
 \n\
-See also: rand")
+@example\n\
+randn (\"seed\")\n\
+@end example\n\
+\n\
+@noindent\n\
+@code{randn} returns the current value of the seed.\n\
+@end deftypefn")
 {
   octave_value_list retval;