1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2008 - INRIA - Vincent COUVERT <vincent.couvert@inria.fr>
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 // Tests for function dsaupd (added after a bug in the gateway: PutLhsVar missing)
14 A = sprand(N, N, 0.01);
17 BMAT = 'I'; //standard eigenvalue problem
19 NEV = 4; //NEVth eigen values are solved
21 RESID = zeros(N,1); //
38 IPARAM = [ISHIFT, LEVEC, MXITER, NB, NCONV, IUPD, MODE, NP, NUMOP, NUMOPB, NUMREO];
42 WORKL = zeros(1, NCV**2 + 8 * NCV);
49 [IDO,RESID,V,IPARAM,IPNTR,WORKD,WORKL,INFO] = dsaupd(IDO,BMAT,N,WHICH,NEV,TOL,RESID,NCV,V,IPARAM,IPNTR,WORKD,WORKL,INFO);
51 while (IDO <> 99) & (IDO <> 3)
52 [IDO,RESID,V,IPARAM,IPNTR,WORKD,WORKL,INFO] = dsaupd(IDO,BMAT,N,WHICH,NEV,TOL,RESID,NCV,V,IPARAM,IPNTR,WORKD,WORKL,INFO);
54 WORKD(IPNTR(2):(IPNTR(2)+N - 1)) = A * WORKD(IPNTR(1):(IPNTR(1)+N - 1));
55 elseif (IDO == 3) then