function ret=swaprow( a, b, M )
  ret=M;
  ret(a,:)=M(b,:);
  ret(b,:)=M(a,:);
endfunction
