comparison scripts/sparse/bicg.m @ 13929:9cae456085c2

Grammarcheck of documentation before 3.6.0 release. * accumarray.m, blkdiag.m, nargoutchk.m, nthargout.m, profexplore.m, profile.m, computer.m, orderfields.m, recycle.m, version.m, sqp.m, matlabroot.m, __plt_get_axis_arg__.m, isonormals.m, isosurface.m, __fltk_file_filter__.m, __is_function__.m, __uigetdir_fltk__.m, __uigetfile_fltk__.m, __uiobject_split_args__.m, __uiputfile_fltk__.m, uicontextmenu.m, uiresume.m, uiwait.m, mkpp.m, ppder.m, residue.m, addpref.m, getpref.m, ispref.m, loadprefs.m, prefsfile.m, saveprefs.m, rmpref.m, setpref.m, fftshift.m, bicg.m, bicgstab.m, cgs.m, gmres.m, __sprand_impl__.m, quantile.m, deblank.m, strsplit.m, addtodate.m, bsxfun.cc, kron.cc, regexp.cc, data.cc, file-io.cc, graphics.cc, load-save.cc, mappers.cc: Grammarcheck of documentation before 3.6.0 release.
author Rik <octave@nomad.inbox5.com>
date Wed, 23 Nov 2011 08:38:19 -0800
parents 53674ceb9133
children 9de488c6c59c
comparison
equal deleted inserted replaced
13928:2892fd834446 13929:9cae456085c2
14 ## You should have received a copy of the GNU General Public License 14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; If not, see <http://www.gnu.org/licenses/>. 15 ## along with this program; If not, see <http://www.gnu.org/licenses/>.
16 16
17 ## -*- texinfo -*- 17 ## -*- texinfo -*-
18 ## 18 ##
19 ## @deftypefn {Function File} {@var{x} =} bicg (@var{A}, @var{b}, @var{rtol}, @var{maxit}, @var{M1}, @var{M2}, @var{x0}) 19 ## @deftypefn {Function File} {@var{x} =} bicg (@var{A}, @var{b}, @var{rtol}, @var{maxit}, @var{M1}, @var{M2}, @var{x0})
20 ## @deftypefnx {Function File} {@var{x} =} bicg (@var{A}, @var{b}, @var{rtol}, @var{maxit}, @var{P}) 20 ## @deftypefnx {Function File} {@var{x} =} bicg (@var{A}, @var{b}, @var{rtol}, @var{maxit}, @var{P})
21 ## @deftypefnx {Function File} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}] =} bicg (@var{A}, @var{b}, ...) 21 ## @deftypefnx {Function File} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}] =} bicg (@var{A}, @var{b}, @dots{})
22 ## Solve @code{A x = b} using the Bi-conjugate gradient iterative method. 22 ## Solve @code{A x = b} using the Bi-conjugate gradient iterative method.
23 ## 23 ##
24 ## @itemize @minus 24 ## @itemize @minus
25 ## @item @var{rtol} is the relative tolerance, if not given 25 ## @item @var{rtol} is the relative tolerance, if not given
26 ## or set to [] the default value 1e-6 is used. 26 ## or set to [] the default value 1e-6 is used.
27 ##
27 ## @item @var{maxit} the maximum number of outer iterations, 28 ## @item @var{maxit} the maximum number of outer iterations,
28 ## if not given or set to [] the default value 29 ## if not given or set to [] the default value
29 ## @code{min (20, numel (b))} is used. 30 ## @code{min (20, numel (b))} is used.
31 ##
30 ## @item @var{x0} the initial guess, if not given or set to [] 32 ## @item @var{x0} the initial guess, if not given or set to []
31 ## the default value @code{zeros (size (b))} is used. 33 ## the default value @code{zeros (size (b))} is used.
32 ## @end itemize 34 ## @end itemize
33 ## 35 ##
34 ## @var{A} can be passed as a matrix or as a function handle or 36 ## @var{A} can be passed as a matrix or as a function handle or
45 ## 47 ##
46 ## @itemize @minus 48 ## @itemize @minus
47 ## @item @var{flag} indicates the exit status: 49 ## @item @var{flag} indicates the exit status:
48 ## @itemize @minus 50 ## @itemize @minus
49 ## @item 0: iteration converged to the within the chosen tolerance 51 ## @item 0: iteration converged to the within the chosen tolerance
52 ##
50 ## @item 1: the maximum number of iterations was reached before convergence 53 ## @item 1: the maximum number of iterations was reached before convergence
54 ##
51 ## @item 3: the algorithm reached stagnation 55 ## @item 3: the algorithm reached stagnation
52 ## @end itemize 56 ## @end itemize
53 ## (the value 2 is unused but skipped for compatibility). 57 ## (the value 2 is unused but skipped for compatibility).
58 ##
54 ## @item @var{relres} is the final value of the relative residual. 59 ## @item @var{relres} is the final value of the relative residual.
60 ##
55 ## @item @var{iter} is the number of iterations performed. 61 ## @item @var{iter} is the number of iterations performed.
62 ##
56 ## @item @var{resvec} is a vector containing the relative residual at each iteration. 63 ## @item @var{resvec} is a vector containing the relative residual at each iteration.
57 ## @end itemize 64 ## @end itemize
58 ## 65 ##
59 ## @seealso{bicgstab,cgs,gmres,pcg} 66 ## @seealso{bicgstab, cgs, gmres, pcg}
60 ## 67 ##
61 ## @end deftypefn 68 ## @end deftypefn
62 69
63 70
64 function [x, flag, res1, k, resvec] = bicg (A, b, tol, maxit, M1, M2, x0) 71 function [x, flag, res1, k, resvec] = bicg (A, b, tol, maxit, M1, M2, x0)