1
function cs_demo2 (do_pause, matrixpath)
2
%CS_DEMO2 MATLAB version of the CSparse/Demo/cs_demo2.c program.
3
% Solves a linear system using Cholesky, LU, and QR, with various orderings.
9
% Copyright 2006-2007, Timothy A. Davis.
10
% http://www.cise.ufl.edu/research/sparse
16
if (isempty (matrixpath))
18
% older versions of MATLAB do not have an input argument to mfilename
19
p = mfilename ('fullpath') ;
20
t = strfind (p, filesep) ;
21
matrixpath = [ p(1:t(end)) '../../Matrix' ] ;
23
% assume we are in the C*Sparse/MATLAB/CSparse/Demo directory
24
matrixpath = '../../Matrix' ;
28
matrices = { 't1', 'HB/fs_183_1', 'HB/west0067', 'LPnetlib/lp_afiro', ...
29
'HB/ash219', 'HB/mbeacxc', 'HB/bcsstk01', 'HB/bcsstk16' } ;
35
for i = 1:length(matrices)
37
[C sym] = get_problem (matrixpath, name, 1e-14) ;
38
demo2 (C, sym, name) ;
40
input ('Hit enter to continue: ') ;