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

« back to all changes in this revision

Viewing changes to CSparse/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:
54
54
cs_demo (do_pause)
55
55
 
56
56
%-------------------------------------------------------------------------------
57
 
function [v,pc] = getversion
 
57
function v = getversion
58
58
% determine the MATLAB version, and return it as a double.
59
 
% only the primary and secondary version numbers are kept.
60
 
% MATLAB 7.0.4 becomes 7.0, version 6.5.2 becomes 6.5, etc.
61
 
v = version ;
62
 
t = find (v == '.') ;
63
 
if (length (t) > 1)
64
 
    v = v (1:(t(2)-1)) ;
65
 
end
66
 
v = str2double (v) ;
67
 
try
68
 
    % ispc does not appear in MATLAB 5.3
69
 
    pc = ispc ;
70
 
catch
71
 
    % if ispc fails, assume we are on a Windows PC if it's not unix
72
 
    pc = ~isunix ;
73
 
end
 
59
v = sscanf (version, '%d.%d.%d') ;
 
60
v = 10.^(0:-1:-(length(v)-1)) * v ;