% clear; L=1; % length of interval s=51; % number of terms to plot x=-L:.01:L; f = 0*x; % initialize f % terms from a0 f = f + 0; % terms from an for n=1:2:s % odd terms f = f + 0*cos(n*(pi/L)*x); end % terms from bn for n=1:2:s % odd terms f = f + (4/(n*pi))*sin(n*(pi/L)*x); end plot(x,f,'b-'); % blue solid