Y = load('DuDat.m');
u = Y(:,1);
D = abs((Y(:,2)));
Dprime = diff(D);
u1 = u(2:length(u));
prec = 1e-3;

k = 1;
for j = 1:length(Dprime)
    if (abs(Dprime(j)) < prec) & (D(j+1) > prec)
        Dpeak(k) = D(j+1);
        up(k) = u(j+1);
        k = k+1;
    end
end


subplot(2,1,1)
plot(u,D,'b',u1,Dprime,'o-g',up,Dpeak,'ok')
grid on;

subplot(2,1,2)
plot(up,Dpeak,'k')

