close all;
clear all;

x = linspace(-10,10,1000);

b0 = 17/3;
f = b0*ones(1,length(x));

for m=1:30
   a(m) = 2/3*(9/(m*pi)*(1-cos(4*m*pi/3))+...
        15/(2*m*pi)*(cos(4*m*pi/3)-1));
   b(m) = 2/3*((9/(m*pi))*(sin(4*m*pi/3))+...
        (15/(2*m*pi))*(-sin(4*m*pi/3)));
   f = f + a(m)*sin(2*m*pi*x/3) + b(m)*cos(2*m*pi*x/3);
end

plot(x,f);
