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.

2lsqr<br />

Purpose LSQR implementation of Conjugate Gradients on the Normal Equations<br />

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

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

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

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

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

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

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

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

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

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

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

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

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

A is consistent, otherwise it attempts to solve the least squares solution x that<br />

minimizes norm(b-A*x). The m-by-n coefficient matrix A need not be square but<br />

it should be large and sparse. The column vector b must have length m. A can<br />

be a function afun such that afun(x) returns A*x and afun(x,'transp')<br />

returns A'*x.<br />

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

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

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

the iteration number at which the method stopped or failed. You can suppress<br />

these messages by calling lsqr with the syntax<br />

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

which returns an integer flag instead of the message, as described in the<br />

following table.<br />

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

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

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

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

lsqr<br />

2-1383

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

Saved successfully!

Ooh no, something went wrong!