N=500;
n=[10 20 30 40 50 60 70 80 90 100];
for j=1:length(n)
  m=0;
  for i=1:N
    A=rand(n(j));
    [L,U,P,rho]=LU(A);     
    m=m+rho;
  end;
  g(j)=m/N
end;
plot(n,g,'--',n,0.25*n.^(0.71),'-');
legend('average growth factor','0.25*n^{0.71}','Location','NorthWest')
xlabel('matrix size'),ylabel('growth factor \rho')