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 // =============================================================================
8 // <-- CLI SHELL MODE -->
10 // <-- Non-regression test for bug 12772 -->
12 // <-- Bugzilla URL -->
13 // http://bugzilla.scilab.org/show_bug.cgi?id=12772
15 // <-- Short Description -->
16 // eigs() failed when trying to solve a sparse matrix eigen value problem.
17 // =============================================================================
20 C1(1:$-1, 2:$) = C1(1:$-1,2:$) + diag(100*ones(9,1));
21 C1(2:$,1:$-1) = C1(2:$,1:$-1) + diag(100*ones(9,1));
26 [d, v] = eigs(C1,sparse(eye(10,10)), 1, 480);
27 assert_checkalmostequal(C1*v, v*d, sqrt(%eps), 1.e-10);