xdel(winsid())
clear;

t = [0:0.01:10];
a = 1;
b = 2;
k = 1;

y = k*(exp(-a*t) - exp(-b*t) );
ymax = max(y)*ones(1,length(y));

ylong=[];
tlong=[];
for i = [-1:11]
    if(modulo(i, 5) == 0)
        disp('yoman!')
        ylong = [ylong y];
    else
        disp('shitdude!')
        ylong = [ylong zeros(1,length(y))];
    end
end

xlong = [1:length(ylong)];

xpts = [1 1];
ypts = [-1 0];
plot(xpts*1000, ypts, '--');
plot(xpts*6000, ypts, '--');
//plot(xpts*8.96, ypts, '--');

plot(ylong, 'black');
plot(ones(1,length(ylong))*-.01, 'white');
plot(ones(1,length(ylong))*max(ylong)*1.01, 'white');
//plot(t,ymax.*0.9, '--');

// titletxt = ['$y = k(e^{-\alpha t} - e^{-\beta t})$' ; strcat(['$k=', string(k), ', \alpha=', string(a), ', \beta=', string(b), '$']) ];

titletxt = '$y = k(e^{-\alpha t} - e^{-\beta t})$';
title("Consecutive pulses", 'fontsize', 8);
xlabel('t (s)', 'fontsize', 7);
ylabel('U (V)', 'fontsize', 7, 'rotation', 0);

a = get("current_axes");
a.axes_visible = "off";
//a.margins = [0 0 0 0];
//a.zoom_box=[1,-0.01;10013,0.2524975];
a.data_bounds = [1,-0.01;11500,0.2524975];
//zoom_rect([-1,-1,1,1]);


