v = 50;
A = [
11 -5 0 0 0 -1;
-20 41 -15 0 -6 0;
0 -3 7 -4 0 0;
0 0 -1 2 -5 0;
0 -3 0 -10 28 -15;
-2 0 0 0 -15 47;
];
[A, success, pivots, cond] = Factor(A);
b = [
5 * v;
0;
0;
0;
0;
0;
];
assert(success == 0, 'can not factor');
disp(cond);
x = Solve(A, pivots, b);
disp(x);
The first number is the condition number, the rest are vi in order.
Exercise2_15
7.019005935418257e+01
2.705745341614907e+01
9.704968944099383e+00
-6.987577639751547e+00
-1.950698757763974e+01
-6.405279503105588e+00
-8.928571428571426e-01
diary off