function [app,M] = Fig2x2(t,N)
% Approximating t on [-pi,pi]
% Initialize with a0/2.... note that a0 = 0;
app = zeros(size(t));
% Add consecutive terms
for k = 1:N
app = app + 2/k*(-1)^(k+1)*sin(k*t);
plot(t,chi,t,app);
M(k) = getframe;
end
% M is a movie of the results