function Aprime=replace(A,row1,row2,multiple)
% replaces row1 in a matrix by the sum of row1 and a multiple of row2
Aprime=A;
Aprime(row1,:)=A(row1,:)+multiple*A(row2,:);

  