clear a=eye(3,3) b=[7 8 9] a(3,:)=b([3 1 2])