Home > freetb4matlab > sparse > cgs.m

cgs

PURPOSE ^

% This procedure attempts to solve a system of linear equations A*x = b for x.

SYNOPSIS ^

function [x, flag, relres, iter, resvec] = cgs (A, b, tol, maxit, M1, M2, x0)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} cgs (@var{A}, @var{b})
% @deftypefnx {Function File} {} cgs (@var{A}, @var{b}, @var{tol}, @var{maxit}, @var{M1}, @var{M2}, @var{x0})
% This procedure attempts to solve a system of linear equations A*x = b for x.
% The @var{A} must be square, symmetric and positive definite real matrix N*N.
% The @var{b} must be a one column vector with a length of N.
% The @var{tol} specifies the tolerance of the method, default value is 1e-6.
% The @var{maxit} specifies the maximum number of iteration, default value is MIN(20,N).
% The @var{M1} specifies a preconditioner, can also be a function handler which returns M\X.
% The @var{M2} combined with @var{M1} defines preconditioner as preconditioner=M1*M2.
% The @var{x0} is initial guess, default value is zeros(N,1).
%
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003