function courbe = trace_ed(R,l,c)
dim_image = (l-1)*(c-1)
R2 = R(:);
R3 = sort(R2);
x = zeros([dim_image 1]);
k = 1:dim_image;
x(k) = k;
f = R3(dim_image-(x-1));
R3(dim_image)
df = diff(R3(dim_image-(x-1)))./diff(x);
xd = x(1:length(x)-1);
b = 0:0.0001:0.2551;
t1 = floor(10^(log10(dim_image)/3));
t2 = floor(10^(2*log10(dim_image)/3));
k2 = 1:0.001:t1;
% les differents plots:
%figure, plot(x,f,'b',xd,df,'r');
figure, courbe = semilogx(x,f,'k')%,t1,b,'k',k2,0.2551,'k'
imwrite(courbe,'trace_ed.tif')
%,t2,b,'k',xd,df,'k'