function B = rowswap(A,i,j) % ROWSWAP Given an m x n matrix A and two intergers i and j % between 1 and m, this function produces an m x n matrix % that results from intercharging row i and row j of A. B = A; B(i,:) = A(j,:); B(j,:) = A(i,:);