2
%TEST3 test cs_lsolve, cs_ltsolve, cs_usolve, cs_chol
8
% Copyright 2006-2007, Timothy A. Davis.
9
% http://www.cise.ufl.edu/research/sparse
13
[ignore f] = sort (max (index.nrows, index.ncols)) ;
33
A = A + 1i*sprand(A) ;
36
A = A*A' + 2*n*speye (n) ;
49
b = b + 1i*rand(n,1) ;
54
fprintf ('condest: %g\n', c) ;
57
x2 = cs_lsolve (L0,b) ;
58
err = norm (x1-x2,1) ;
64
x2 = cs_ltsolve (L0,b) ;
65
err = norm (x1-x2,1) ;
73
x2 = cs_usolve (U,b) ;
74
err = norm (x1-x2,1) ;
80
subplot (2,3,1) ; spy (L0) ;
81
subplot (2,3,4) ; spy (L2) ;
82
err = norm (L0-L2,1) ;
89
subplot (2,3,2) ; spy (L1) ;
90
subplot (2,3,5) ; spy (L2) ;
91
err = norm (L1-L2,1) ;
96
[L3,p] = cs_chol (A) ;
99
subplot (2,3,3) ; spy (L4) ;
100
subplot (2,3,6) ; spy (L3) ;
101
err = norm (L4-L3,1) ;