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

« back to all changes in this revision

Viewing changes to CXSparse_newfiles/MATLAB/Test/test1.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:
17
17
 
18
18
    Prob = UFget (ii) ;
19
19
    disp (Prob) ;
20
 
    for cmplex = 0:1
 
20
    for cmplex = 0:double(~ispc)
21
21
 
22
22
        A = Prob.A ;
23
23
        if (cmplex)
53
53
            end
54
54
        % end
55
55
 
56
 
        x = x + 1i*rand (n,1) ;
57
 
        y = y + 1i*rand (m,1) ;
58
 
        z = y+A*x ;
59
 
        q = cs_gaxpy (A,x,y) ;
60
 
        err = norm (z-q,1) / norm (z,1) ;
61
 
        disp (err) ;
62
 
        if (err > 1e-14)
63
 
            error ('!')
64
 
        end
 
56
        if (~ispc)
 
57
            x = x + 1i*rand (n,1) ;
 
58
            y = y + 1i*rand (m,1) ;
 
59
            z = y+A*x ;
 
60
            q = cs_gaxpy (A,x,y) ;
 
61
            err = norm (z-q,1) / norm (z,1) ;
 
62
            disp (err) ;
 
63
            if (err > 1e-14)
 
64
                error ('!')
 
65
            end
 
66
        end
65
67
 
66
68
        [i j x] = find (A) ;
67
69
        p = randperm (length (i)) ;