close all; clear all;
x = linspace(0,4,1000);
f = zeros(1,1000);

for n=1:100
    f = f - (2/(n*pi))*(cos(n*pi/2)-cos(n*pi/4))*sin(n*pi*x/4);
end

plot(x,f);
