function n=r2(m,a,b) %r2(Matrix,a,b) takes a matrix and swaps row a with row b l=m; c=size(l); for i=1:c(2) d=l(a,i); l(a,i)=l(b,i); l(b,i)=d; end n=l;