% COLSPACE(A) Returns a basis for the column space of A % This is a sample MATLAB .m file that discards linearly % dependent columns from the matrix A. % This is a better demo file for Math 63 function B = colspace(A) B=[]; for x=A if rank([B x]) > rank(B) B = [B x]; end end