"Nasser M. Abbasi" wrote in message <keu59d$ck$1@speranza.aioe.org>... > On 2/6/2013 11:49 AM, Boosan wrote: > > How can i swap rows of a matrix? > > > > may be > > tmp = A(2,:) > A(2,:) = A(3,:) > A(3,:) = tmp

This trick of using temporary variable is good for C, fortran. In MATLAB simply do