t=str2sym('t');w=str2sym('w');Gt=str2sym('heaviside(t+2)-heaviside(t-2)');Fw=fourier(Gt,t ,w);FFP=abs(Fw);subplot(211);fplot(Gt,[-5 5]);subplot(212);fplot(FFP);grid;