t= zeros(20);
taille = zeros(20);
j=0
for n=100:20:500 
    disp(n);
    A=rand(n,n)    
    timer();
    B=A^25;
    j=j+1
    x=timer();
    t(j)=x;
    disp(t(j));
    taille(j)=n;
end

plot2d(log(taille+0.1),log(t+0.1), style=2);


t= zeros(20);
taille = zeros(20);
j=0
for n=100:20:500 
    disp(n);
    A=rand(n,n)    
    timer();
    [P,D]=spec(A);
    Vp=diag(D);
    Vp=Vp^25;
    Vp=diag(Vp);
    B=P*Vp*inv(P);
    x=timer();
    j=j+1
    t(j)=x;
    disp(t(j));
    taille(j)=n;
end
disp(t);


plot2d(log(taille+0.1),log(t+0.1), style=5);
