28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gmres<br />

2-982<br />

or [], then the maximum number of total iterations is maxit (instead of<br />

restart*maxit).<br />

gmres(A,b,restart,tol,maxit,M) and<br />

gmres(A,b,restart,tol,maxit,M1,M2) use preconditioner M or M = M1*M2 and<br />

effectively solve the system inv(M)*A*x = inv(M)*b for x. If M is [] then gmres<br />

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

gmres(A,b,restart,tol,maxit,M1,M2,x0) specifies the first initial guess. If<br />

x0 is [], then gmres uses the default, an all-zero vector.<br />

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

parameters to functions afun(x,p1,p2,...), m1fun(x,p1,p2,...), and<br />

m2fun(x,p1,p2,...).<br />

[x,flag] = gmres(A,b,...) also returns a convergence flag:<br />

flag = 0 gmres converged to the desired tolerance tol within maxit<br />

outer iterations.<br />

flag = 1 gmres iterated maxit times but did not converge.<br />

flag = 2 Preconditioner M was ill-conditioned.<br />

flag = 3 gmres stagnated. (Two consecutive iterates were the same.)<br />

Whenever flag is not 0, the solution x returned is that with minimal norm<br />

residual computed over all the iterations. No messages are displayed if the<br />

flag output is specified.<br />

[x,flag,relres] = gmres(A,b,...) also returns the relative residual<br />

norm(b-A*x)/norm(b). If flag is 0, relres

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

Saved successfully!

Ooh no, something went wrong!