A = sparse(10,10);
A(1,2) = 3;
A(1,3) = 5;
A(2,4) = 7;
A(3,2) = 2;
A(3,4) = 6;
A(3,5) = 1;
A(4,5) = -8;
A(4,6) = 5;
A(5,6) = -3;
A(6,7) = 2;
A(6,9) = 5;
A(7,2) = -4;
A(7,8) = 2;
A(8,10) = 4;
A(9,10) = 6;

Q = sparse(10,10);
Q(1,2) = 2;
Q(1,3) = 6;
Q(2,4) = 8;
Q(3,2) = 6;
Q(3,4) = 1;
Q(3,5) = 11;
Q(4,5) = 4;
Q(4,6) = 7;
Q(5,6) = 9;
Q(6,7) = 3;
Q(6,9) = 6;
Q(7,2) = 2;
Q(7,8) = 4;
Q(8,10) = 13;
Q(9,10) = 11;

q = 70;