~ubuntu-branches/ubuntu/hardy/suitesparse/hardy

« back to all changes in this revision

Viewing changes to CXSparse_newfiles/MATLAB/cs_install.m

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere, Rafael Laboissiere, Ondrej Certik
  • Date: 2008-02-21 14:46:50 UTC
  • mfrom: (1.1.2 upstream) (5.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080221144650-tgeppgj0t7s759i8
Tags: 3.1.0-3
[ Rafael Laboissiere ]
* Upload to unstable

[ Ondrej Certik ]
* XS-DM-Upload-Allowed: yes field added
* Ondrej Certik added to uploaders

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
cs_demo (do_pause)
51
51
 
52
52
%-------------------------------------------------------------------------------
53
 
function [v,pc] = getversion
 
53
function v = getversion
54
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.
57
 
v = version ;
58
 
t = find (v == '.') ;
59
 
if (length (t) > 1)
60
 
    v = v (1:(t(2)-1)) ;
61
 
end
62
 
v = str2double (v) ;
63
 
try
64
 
    % ispc does not appear in MATLAB 5.3
65
 
    pc = ispc ;
66
 
catch
67
 
    % if ispc fails, assume we are on a Windows PC if it's not unix
68
 
    pc = ~isunix ;
69
 
end
 
55
v = sscanf (version, '%d.%d.%d') ;
 
56
v = 10.^(0:-1:-(length(v)-1)) * v ;