1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2013 - Scilab Enterprises - Sylvestre Ledru
4 // Copyright (C) 2013 - Michaƫl Baudin
6 // This file is distributed under the same license as the Scilab package.
7 // =============================================================================
9 // <-- CLI SHELL MODE -->
11 // <-- Non-regression test for bug 9196 -->
13 // <-- Bugzilla URL -->
14 // http://bugzilla.scilab.org/show_bug.cgi?id=9196
16 // <-- Short Description -->
17 // The threshold level for conditioning in backslash is too small.
18 // =============================================================================
21 A = testmatrix("hilb",n);
33 assert_checkalmostequal(x, xexpected);
36 Ac=complex(A,zeros(A));
37 bc=complex(b,zeros(b));
39 xcexpected=complex(xexpected,zeros(xexpected));
40 assert_checkalmostequal(xc, xexpected);
53 assert_checkalmostequal(x, xexpected);
54 Ac=complex(A,zeros(A));
55 bc=complex(b,zeros(b));
57 xcexpected=complex(xexpected,zeros(xexpected));
58 assert_checkalmostequal(xc, xexpected);
60 b=[1;-1;1;-1;1;-1;1;-1;1];
71 assert_checkalmostequal(x, xexpected);
72 Ac=complex(A,zeros(A));
73 bc=complex(b,zeros(b));
75 xcexpected=complex(xexpected,zeros(xexpected));
76 assert_checkalmostequal(xc, xexpected);