

t = 0:.01:10;
x = 0;
sinal =[];

for n = 1:2:301
    x= x + 1/(n*pi)*(sin(n*(pi/2))-2*sin(3*n*pi/2)+sin(5*pi*n/2))*cos(t*n*(pi/2));
    sinal = [sinal; x];
end
figure(1)
plot(t,x);


figure(2)
subplot(2,2,1)
plot(t,sinal(1,:));

subplot(2,2,2)
plot(t,sinal(2,:));

subplot(2,2,3)
plot(t,sinal(3,:));

subplot(2,2,4)
plot(t,sinal(151,:));
