t=0:25/1000:25

w = [ones(2*floor(length(t)/5),1);ones(floor(length(t)/5),1)*0.9;ones(2*floor(length(t)/5),1)];
w(ceil(length(t)))=1;

wt = timeseries(w,t);

v = [ones(floor(4*length(t)/5),1)*0;ones(floor(length(t)/5),1)*1];
v(ceil(length(t)))=1;

vt = timeseries(v,t);

plot(t,v)