% EXERTWO3  Exercise 2.3 in Moler.

alf = 1/sqrt(2);
A = [alf   0  -1 -alf    0   0    0;
     alf   0   0  alf    0   0    0;
       0   1   0  alf -alf  -1    0;
       0   0   0  alf  alf   0    0;
       0   0   1    0  alf   0 -alf;
       0   0   0    0  alf   0  alf;
       0   0   0    0    0   1  alf];
b = [0 -10 0 15 0 -20 0]';
x = A \ b;
f = [x(1) x(2) 10 x(3) x(4) x(2) 0 x(3) x(5) x(6) 20 x(7) x(6)]'
