function y = rect(t) % Rectangle Function y = (sign(t+1/2) - sign(t-1/2))/2;