23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

icgstab<br />

2bicgstab<br />

Purpose BiConjugate Gradients Stabilized method<br />

Syntax x = bicgstab(A,b)<br />

bicgstab(A,b,tol)<br />

bicgstab(A,b,tol,maxit)<br />

bicgstab(A,b,tol,maxit,M)<br />

bicgstab(A,b,tol,maxit,M1,M2)<br />

bicgstab(A,b,tol,maxit,M1,M2,x0)<br />

bicgstab(afun,b,tol,maxit,m1fun,m2fun,x0,p1,p2,...)<br />

[x,flag] = bicgstab(A,b,...)<br />

[x,flag,relres] = bicgstab(A,b,...)<br />

[x,flag,relres,iter] = bicgstab(A,b,...)<br />

[x,flag,relres,iter,resvec] = bicgstab(A,b,...)<br />

Description x = bicgstab(A,b) attempts to solve the system of linear equations A*x=b for<br />

x. The n-by-n coefficient matrix A must be square and the column vector b must<br />

have length n. A can be a function afun such that afun(x) returns A*x.<br />

2-154<br />

If bicgstab converges, a message to that effect is displayed. If bicgstab fails<br />

to converge after the maximum number of iterations or halts for any reason, a<br />

warning message is printed displaying the relative residual norm(b-A*x)/<br />

norm(b) and the iteration number at which the method stopped or failed.<br />

bicgstab(A,b,tol) specifies the tolerance of the method. If tol is [], then<br />

bicgstab uses the default, 1e-6.<br />

bicgstab(A,b,tol,maxit) specifies the maximum number of iterations. If<br />

maxit is [], then bicgstab uses the default, min(n,20).<br />

bicgstab(A,b,tol,maxit,M) and bicgstab(A,b,tol,maxit,M1,M2) use<br />

preconditioner M or M = M1*M2 and effectively solve the system<br />

inv(M)*A*x = inv(M)*b for x. If M is [] then bicgstab applies no<br />

preconditioner. M can be a function that returns M\x.<br />

bicgstab(A,b,tol,maxit,M1,M2,x0) specifies the initial guess. If x0 is [],<br />

then bicgstab uses the default, an all zero vector.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!