john=[-2  -2  0  2  -6 ;1  5  4  -3  11 ;3  5  2  -4  13;0  -2 -2  1  -4]';
mary= [1  1  0  -1  3 ;-2  0  2  1  -2 ;-1  3  4  1  5]';
rankm=rank(mary)
joint=[mary john];
rankjm=rank(joint)
'are the ranks the same?'
pause
[m,n]=size(joint);
a=joint;
ap=joint;
i=1;t=1;
pivotjm;
a
rank(a)
pause
i=4;t=2;
pivotjm;
a
rank(a)
pause
i=2;t=3;
pivotjm;
a
rank(a)
