1
function cs_install (do_pause)
2
%CS_INSTALL: compile and install CXSparse for use in MATLAB.
3
% Your current working directory must be CXSparse/MATLAB in order to use this
8
% CXSparse/MATLAB/CSparse
10
% CXSparse/MATLAB/UFget
12
% are added to your MATLAB path (see the "pathtool" command to add these to
13
% your path permanently, for future MATLAB sessions).
15
% Next, the MATLAB CXSparse demo program, CXSparse/MATLAB/cs_demo is executed.
16
% To run the demo with pauses so you can see the results, use cs_install(1).
17
% To run the full MATLAB test programs for CXSparse, run testall in the
21
% cs_install % install and run demo with no pauses
22
% cs_install(1) % install and run demo with pauses
26
% Copyright 2006-2007, Timothy A. Davis.
27
% http://www.cise.ufl.edu/research/sparse
29
fprintf ('Compiling and installing CXSparse\n') ;
35
input ('Hit enter to continue: ') ;
37
addpath ([pwd filesep 'CSparse']) ;
38
addpath ([pwd filesep 'Demo']) ;
42
addpath ([pwd filesep 'UFget']) ;
44
fprintf ('UFget not installed (MATLAB 7.0 or later required)\n') ;
52
%-------------------------------------------------------------------------------
53
function [v,pc] = getversion
54
% determine the MATLAB version, and return it as a double.
55
% only the primary and secondary version numbers are kept.
56
% MATLAB 7.0.4 becomes 7.0, version 6.5.2 becomes 6.5, etc.
64
% ispc does not appear in MATLAB 5.3
67
% if ispc fails, assume we are on a Windows PC if it's not unix