1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2013 - Scilab Enterprises - Adeline CARNIS
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7 // <-- CLI SHELL MODE -->
8 // <-- Non-regression test for bug 12772 -->
10 // <-- Bugzilla URL -->
11 // http://bugzilla.scilab.org/show_bug.cgi?id=12772
13 // <-- Short Description -->
14 // eigs() failed when trying to solve a sparse matrix eigen value problem.
15 // =============================================================================
17 C1(1:$-1, 2:$) = C1(1:$-1,2:$) + diag(100*ones(9,1));
18 C1(2:$,1:$-1) = C1(2:$,1:$-1) + diag(100*ones(9,1));
22 [d, v] = eigs(C1,sparse(eye(10,10)), 1, 480);
23 assert_checkalmostequal(C1*v, v*d, sqrt(%eps), 1.e-10);