# MATLAB problem (#8) from Homework 5 A = 10*rand(4,6) B = A(:,[2 5 1 4 6 3]) C = rref(A) D = rref(B) fprintf(1,'\n C and D are not the same matrix.\n\n'); E = C(:,[2 5 1 4 6 3]) fprintf(1,'\n E and D are not the same matrix either.\n But reduced echelon of E should be the same as D.\n\n'); Erref = rref(E) %%%%%%%%%%%%%%% OUTPUT FROM MATLAB %%%%%%%%%%%%%%%%%%%%%%% A = 8.1472 6.3236 9.5751 9.5717 4.2176 6.5574 9.0579 0.9754 9.6489 4.8538 9.1574 0.3571 1.2699 2.7850 1.5761 8.0028 7.9221 8.4913 9.1338 5.4688 9.7059 1.4189 9.5949 9.3399 B = 6.3236 4.2176 8.1472 9.5717 6.5574 9.5751 0.9754 9.1574 9.0579 4.8538 0.3571 9.6489 2.7850 7.9221 1.2699 8.0028 8.4913 1.5761 5.4688 9.5949 9.1338 1.4189 9.3399 9.7059 C = 1.0000 0 0 0 17.2819 11.5872 0 1.0000 0 0 0.8395 2.4249 0 0 1.0000 0 -15.9067 -11.3994 0 0 0 1.0000 1.0883 0.6236 D = 1.0000 0 0 0 1.8233 0.0528 0 1.0000 0 0 0.7166 -0.0629 0 0 1.0000 0 -0.7977 1.0865 0 0 0 1.0000 -0.1563 0.0684 C and D are not the same matrix. E = 0 17.2819 1.0000 0 11.5872 0 1.0000 0.8395 0 0 2.4249 0 0 -15.9067 0 0 -11.3994 1.0000 0 1.0883 0 1.0000 0.6236 0 E and D are not the same matrix either. But reduced echelon of E should be the same as D. Erref = 1.0000 0 0 0 1.8233 0.0528 0 1.0000 0 0 0.7166 -0.0629 0 0 1.0000 0 -0.7977 1.0865 0 0 0 1.0000 -0.1563 0.0684