Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!news.glorb.com!news2.glorb.com!tr22g12.aset.psu.edu!news.mathforum.org!not-for-mail
From: GS <gshy2014@gamil.com>
Newsgroups: comp.soft-sys.matlab
Subject: sparse matrix multiplication and cgs()
Date: Mon, 01 Jun 2009 11:19:26 EDT
Organization: The Math Forum
Lines: 7
Message-ID: <17247123.13121.1243869597327.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1243869597 1599 144.118.30.135 (1 Jun 2009 15:19:57 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Mon, 1 Jun 2009 15:19:57 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:543968


Hello, 
   I solved Ax=b, A is large(of size 2e5), sparse(each row has no more than 26 nonzero), symmetric positive definite matrix. I did it in two ways, 
1) L=chol(A,'lower'); tic, x=L\(L'\b),toc;
2) tic,[x,flag,resrel,iter]=cgs(A,b,[],n,[],[],x0),toc;

L is dense, iter=6. So theoretical 2) should be must faster than 1). But 1), 2) ends up with the same time.
Why?