# HG changeset patch # User Colin Macdonald # Date 1427563368 0 # Sat Mar 28 17:22:48 2015 +0000 # Branch list # Node ID c4073b025b954429f78f1de7f5881640f5fa1231 # Parent ff287375dcb479a6f6f36a9b1db5e2159c503412 svd: doc edits diff -r ff287375dcb4 -r c4073b025b95 libinterp/corefcn/svd.cc --- a/libinterp/corefcn/svd.cc Mon Feb 09 23:45:16 2015 +0000 +++ b/libinterp/corefcn/svd.cc Sat Mar 28 17:22:48 2015 +0000 @@ -45,22 +45,34 @@ @deftypefnx {Built-in Function} address@hidden, @var{S}, @var{V}] =} svd (@var{A})\n\ @deftypefnx {Built-in Function} address@hidden, @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^{\\dagger}\n\ + A = U S V^{\\dagger}.\n\ $$\n\ @end tex\n\ @ifnottex\n\ \n\ address@hidden -A = U*S*V'\n\ address@hidden example\n\ address@hidden + A = U*S*V'.\n\ address@hidden verbatim\n\ \n\ @end ifnottex\n\ \n\ The function @code{svd} normally returns only the vector of singular values.\n\ -When called with three return values, it computes\n\ +For example,\n\ address@hidden address@hidden +svd (hilb (3))\n\ address@hidden {} ans =\n\ +\n\ + 1.4083189\n\ + 0.1223271\n\ + 0.0026873\n\ address@hidden group\n\ address@hidden example\n\ +\n\ +When called with three return values, @code{svd} computes\n\ @tex\n\ $U$, $S$, and $V$.\n\ @end tex\n\ @@ -68,37 +80,10 @@ @var{U}, @var{S}, and @var{V}.\n\ @end ifnottex\n\ For example,\n\ -\n\ address@hidden -svd (hilb (3))\n\ address@hidden example\n\ -\n\ address@hidden -returns\n\ -\n\ @example\n\ @group\n\ -ans =\n\ -\n\ - 1.4083189\n\ - 0.1223271\n\ - 0.0026873\n\ address@hidden group\n\ address@hidden example\n\ -\n\ address@hidden -and\n\ -\n\ address@hidden [u, s, v] = svd (hilb (3))\n\ address@hidden example\n\ -\n\ address@hidden -returns\n\ -\n\ address@hidden address@hidden -u =\n\ address@hidden {} u =\n\ \n\ -0.82704 0.54745 0.12766\n\ -0.45986 -0.52829 -0.71375\n\ @@ -106,9 +91,11 @@ \n\ s =\n\ \n\ - 1.40832 0.00000 0.00000\n\ - 0.00000 0.12233 0.00000\n\ - 0.00000 0.00000 0.00269\n\ +Diagonal Matrix\n\ +\n\ + 1.4083189 0 0\n\ + 0 0.1223271 0\n\ + 0 0 0.0026873\n\ \n\ v =\n\ \n\