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 // =============================================================================
7 // Tests for function dsaupd (added after a bug in the gateway: PutLhsVar missing)
10 A = sprand(N, N, 0.01);
12 BMAT = 'I'; //standard eigenvalue problem
14 NEV = 4; //NEVth eigen values are solved
16 RESID = zeros(N,1); //
30 IPARAM = [ISHIFT, LEVEC, MXITER, NB, NCONV, IUPD, MODE, NP, NUMOP, NUMOPB, NUMREO];
33 WORKL = zeros(1, NCV**2 + 8 * NCV);
37 [IDO,RESID,V,IPARAM,IPNTR,WORKD,WORKL,INFO] = dsaupd(IDO,BMAT,N,WHICH,NEV,TOL,RESID,NCV,V,IPARAM,IPNTR,WORKD,WORKL,INFO);
38 while (IDO <> 99) & (IDO <> 3)
39 [IDO,RESID,V,IPARAM,IPNTR,WORKD,WORKL,INFO] = dsaupd(IDO,BMAT,N,WHICH,NEV,TOL,RESID,NCV,V,IPARAM,IPNTR,WORKD,WORKL,INFO);
41 WORKD(IPNTR(2):(IPNTR(2)+N - 1)) = A * WORKD(IPNTR(1):(IPNTR(1)+N - 1));
42 elseif (IDO == 3) then