diff src/DLD-FUNCTIONS/svd.cc @ 11553:01f703952eff

Improve docstrings for functions in DLD-FUNCTIONS directory. Use same variable names in error() strings and in documentation.
author Rik <octave@nomad.inbox5.com>
date Sun, 16 Jan 2011 22:13:23 -0800
parents 06c80c90a246
children 12df7854fa7c
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/svd.cc	Sat Jan 15 15:13:06 2011 -0800
+++ b/src/DLD-FUNCTIONS/svd.cc	Sun Jan 16 22:13:23 2011 -0800
@@ -41,11 +41,11 @@
 
 DEFUN_DLD (svd, args, nargout,
   "-*- texinfo -*-\n\
-@deftypefn  {Loadable Function} {@var{s} =} svd (@var{a})\n\
-@deftypefnx {Loadable Function} {[@var{u}, @var{s}, @var{v}] =} svd (@var{a})\n\
-@deftypefnx {Loadable Function} {[@var{u}, @var{s}, @var{v}] =} svd (@var{a}, @var{econ})\n\
+@deftypefn  {Loadable Function} {@var{s} =} svd (@var{A})\n\
+@deftypefnx {Loadable Function} {[@var{U}, @var{S}, @var{V}] =} svd (@var{A})\n\
+@deftypefnx {Loadable Function} {[@var{U}, @var{S}, @var{V}] =} svd (@var{A}, @var{econ})\n\
 @cindex singular value decomposition\n\
-Compute the singular value decomposition of @var{a}\n\
+Compute the singular value decomposition of @var{A}\n\
 @tex\n\
 $$\n\
  A = U S V^H\n\
@@ -65,7 +65,7 @@
 $U$, $S$, and $V$.\n\
 @end tex\n\
 @ifnottex\n\
-U, S, and V.\n\
+@var{U}, @var{S}, and @var{V}.\n\
 @end ifnottex\n\
 For example,\n\
 \n\
@@ -119,8 +119,8 @@
 @end example\n\
 \n\
 If given a second argument, @code{svd} returns an economy-sized\n\
-decomposition, eliminating the unnecessary rows or columns of @var{u} or\n\
-@var{v}.\n\
+decomposition, eliminating the unnecessary rows or columns of @var{U} or\n\
+@var{V}.\n\
 @seealso{svd_driver, svds, eig}\n\
 @end deftypefn")
 {
@@ -141,7 +141,7 @@
 
   if (arg.ndims () != 2)
     {
-      error ("svd: only valid for matrices");
+      error ("svd: A must be a 2-D matrix");
       return retval;
     }