function x=expf1(t,terms)
x=0.5;
count=1;
while count <= terms
	coeff = -(1-exp(-j*count*pi))/(2*j*count*pi);
    harmonic = coeff*exp(-j*count*pi*t);
    % negate count to get the negative harmonic
    count = -count;
   	coeffneg = -(1-exp(-j*count*pi))/(2*j*count*pi);
    harmonicneg = coeffneg*exp(-j*count*pi*t);
    % negate count again to continue in the loop
    count = -count;
    
	x=x + harmonic + harmonicneg;
    count = count+1;
end
