% function [L,U,P] = mylu(A)
%
% Computes LU factorization of A with partial pivoting
%
% Sample code - needs edditing
function [L,U,P] = mylu(A)
n = size(A,1);
U=A; L=eye(n); P=eye(n);
for k=1:n-1,
 % choose pivot
 [val,i] = max(abs(U(k:n,k)));
 i = i+k-1;

 TO BE COMPLETED

end;
