1
function [x1,x2,e1,e2] = testsolve (A,b) ;
1
function [x1,x2,e1,e2] = testsolve (A,b)
2
3
% [x1,x2,e1,e2] = testsolve (A,b) ;
3
4
% Compare CHOLMOD and MATLAB's x=A\b
4
% x1 = A\b, x2 = cholmod(A,b), e1 = norm(A*x1-b), e2 = norm(A*x2-b)
5
% x1 = A\b, x2 = cholmod2(A,b), e1 = norm(A*x1-b), e2 = norm(A*x2-b)
7
% [x1,x2,e1,e2] = testsolve (A,b) ;
5
12
fprintf ('A: [n %6d real %d] B: [sp:%d nrhs %d real %d] ', ...
6
13
size(A,1), isreal(A), issparse(b), size(b,2), isreal(b)) ;