function I = sqw(t)
global A T ex
r=mod(t,T);
I = A*(r<T*(ex/100));