clear variables

n=[10,50,100,200,300,400,500,600,700,800,900,1000];
ln=length(n);
elapsedTimes=zeros(2,ln);

for i=1:ln
    A=rand(n(i));
    % zeilenorientiert
    t0=cputime;
    LR=LRdecomp(A,0);
    t1=cputime-t0;
    elapsedTimes(1,i)=t1;
    % spaltenorientiert
    t0=cputime;
    LR=LRdecomp(A,1);
    t1=cputime-t0;
    elapsedTimes(2,i)=t1;
end

plot(n,elapsedTimes)
legend('row-wise','column-wise','Location','NorthWest')