Mercurial > hg > octave-lyh
comparison scripts/sparse/svds.m @ 9051:1bf0ce0930be
Grammar check TexInfo in all .m files
Cleanup documentation sources to follow a few consistent rules.
Spellcheck was NOT done. (but will be in another changeset)
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Fri, 27 Mar 2009 22:31:03 -0700 |
parents | eb63fbe60fab |
children | be150a172010 |
comparison
equal
deleted
inserted
replaced
9044:656ad518f385 | 9051:1bf0ce0930be |
---|---|
18 ## @deftypefnx {Function File} {@var{s} =} svds (@var{a}, @var{k}) | 18 ## @deftypefnx {Function File} {@var{s} =} svds (@var{a}, @var{k}) |
19 ## @deftypefnx {Function File} {@var{s} =} svds (@var{a}, @var{k}, @var{sigma}) | 19 ## @deftypefnx {Function File} {@var{s} =} svds (@var{a}, @var{k}, @var{sigma}) |
20 ## @deftypefnx {Function File} {@var{s} =} svds (@var{a}, @var{k}, @var{sigma}, @var{opts}) | 20 ## @deftypefnx {Function File} {@var{s} =} svds (@var{a}, @var{k}, @var{sigma}, @var{opts}) |
21 ## @deftypefnx {Function File} {[@var{u}, @var{s}, @var{v}, @var{flag}] =} svds (@dots{}) | 21 ## @deftypefnx {Function File} {[@var{u}, @var{s}, @var{v}, @var{flag}] =} svds (@dots{}) |
22 ## | 22 ## |
23 ## Find a few singular values of the matrix @var{a}. The singular values | 23 ## Find a few singular values of the matrix @var{a}. The singular values |
24 ## are calculated using | 24 ## are calculated using |
25 ## | 25 ## |
26 ## @example | 26 ## @example |
27 ## @group | 27 ## @group |
28 ## [@var{m}, @var{n}] = size(@var{a}) | 28 ## [@var{m}, @var{n}] = size(@var{a}) |
30 ## @var{a}', sparse(@var{n}, @var{n})]) | 30 ## @var{a}', sparse(@var{n}, @var{n})]) |
31 ## @end group | 31 ## @end group |
32 ## @end example | 32 ## @end example |
33 ## | 33 ## |
34 ## The eigenvalues returned by @code{eigs} correspond to the singular | 34 ## The eigenvalues returned by @code{eigs} correspond to the singular |
35 ## values of @var{a}. The number of singular values to calculate is given | 35 ## values of @var{a}. The number of singular values to calculate is given |
36 ## by @var{k}, whose default value is 6. | 36 ## by @var{k}, whose default value is 6. |
37 ## | 37 ## |
38 ## The argument @var{sigma} can be used to specify which singular values | 38 ## The argument @var{sigma} can be used to specify which singular values |
39 ## to find. @var{sigma} can be either the string 'L', the default, in | 39 ## to find. @var{sigma} can be either the string 'L', the default, in |
40 ## which case the largest singular values of @var{a} are found. Otherwise | 40 ## which case the largest singular values of @var{a} are found. Otherwise |
41 ## @var{sigma} should be a real scalar, in which case the singular values | 41 ## @var{sigma} should be a real scalar, in which case the singular values |
42 ## closest to @var{sigma} are found. Note that for relatively small values | 42 ## closest to @var{sigma} are found. Note that for relatively small values |
43 ## of @var{sigma}, there is the chance that the requested number of singular | 43 ## of @var{sigma}, there is the chance that the requested number of singular |
44 ## values are not returned. In that case @var{sigma} should be increased. | 44 ## values are not returned. In that case @var{sigma} should be increased. |
45 ## | 45 ## |
46 ## If @var{opts} is given, then it is a structure that defines options | 46 ## If @var{opts} is given, then it is a structure that defines options |
47 ## that @code{svds} will pass to @var{eigs}. The possible fields of this | 47 ## that @code{svds} will pass to @var{eigs}. The possible fields of this |
48 ## structure are therefore determined by @code{eigs}. By default three | 48 ## structure are therefore determined by @code{eigs}. By default three |
49 ## fields of this structure are set by @code{svds}. | 49 ## fields of this structure are set by @code{svds}. |
50 ## | 50 ## |
51 ## @table @code | 51 ## @table @code |
52 ## @item tol | 52 ## @item tol |
53 ## The required convergence tolerance for the singular values. @code{eigs} | 53 ## The required convergence tolerance for the singular values. @code{eigs} |
54 ## is passed @var{tol} divided by @code{sqrt(2)}. The default value is | 54 ## is passed @var{tol} divided by @code{sqrt(2)}. The default value is |
55 ## 1e-10. | 55 ## 1e-10. |
56 ## | 56 ## |
57 ## @item maxit | 57 ## @item maxit |
58 ## The maximum number of iterations. The defaut is 300. | 58 ## The maximum number of iterations. The defaut is 300. |
59 ## | 59 ## |
60 ## @item disp | 60 ## @item disp |
61 ## The level of diagnostic printout. If @code{disp} is 0 then there is no | 61 ## The level of diagnostic printout. If @code{disp} is 0 then there is no |
62 ## printout. The default value is 0. | 62 ## printout. The default value is 0. |
63 ## @end table | 63 ## @end table |
64 ## | 64 ## |
65 ## If more than one output argument is given, then @code{svds} also | 65 ## If more than one output argument is given, then @code{svds} also |
66 ## calculates the left and right singular vectors of @var{a}. @var{flag} | 66 ## calculates the left and right singular vectors of @var{a}. @var{flag} |
67 ## is used to signal the convergence of @code{svds}. If @code{svds} | 67 ## is used to signal the convergence of @code{svds}. If @code{svds} |
68 ## converges to the desired tolerance, then @var{flag} given by | 68 ## converges to the desired tolerance, then @var{flag} given by |
69 ## | 69 ## |
70 ## @example | 70 ## @example |
71 ## @group | 71 ## @group |
72 ## norm (@var{a} * @var{v} - @var{u} * @var{s}, 1) <= @dots{} | 72 ## norm (@var{a} * @var{v} - @var{u} * @var{s}, 1) <= @dots{} |