11.07.2015 Views

Introduction to Sparse Matrices In Scilab - Projects

Introduction to Sparse Matrices In Scilab - Projects

Introduction to Sparse Matrices In Scilab - Projects

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.

0 0 0 0 28 20 71 39 0 00 10 0 0 32 0 39 46 8 032 0 0 0 12 33 0 8 82 110 0 65 55 0 0 0 0 11 100];b= ones (10 ,1);Asparse = sparse (A);[x, fail , err , iter , res ]=..pcg ( Asparse ,b, maxIter =30 , <strong>to</strong>l =1d -12)The previous script produces the following output.-->[x, fail , err , iter , res ]=..--> pcg ( Asparse ,b, maxIter =30 , <strong>to</strong>l =1d -12)res =1.0.23027430.11021720.02234630.00964460.00520380.00375250.00069590.00002070.00000421.697D -13iter =10.err =1.697D -13fail =0.x =0.00717510.01344920.00676100.00503390.00737350.00652480.00420640.00934340.00446400.0023456We see that 10 iterations were required <strong>to</strong> get a residual close <strong>to</strong> 10 −13 .14

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

Saved successfully!

Ooh no, something went wrong!