t=0:0.01:4*pi; y=2/pi; for n=2:1:100; y= y-((2/pi)*(1+ cos(n*pi))*cos(n*t)/(n^2-1)); end plot(t,y); title('Plot title'); xlabel('X Axis'); ylabel('Y Axis'); print -dpng figure.png
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more