function[L,A]=pivot(L,A,i,n);
%
max=0.;
for k=i:n
    if (abs(A(k,i))>max)
        max=abs(A(k,i));
%
        for j=1:n  % column
%            
              temp=A(i,j);
            A(i,j)=A(k,j);
            A(k,j)=temp;
% 
        end
        for m=1:i-1 % column
%            
              temp=L(i,m);
            L(i,m)=L(k,m);
            L(k,m)=temp;
%            
        end    
%
    end
end