MATLAB: HOW I COULD DRAW THIS FUNCTION

drawfunction

IMG_20181203_165117.jpg

Best Answer

final answer by myself!!
x=linspace(-5,5,1000);
s=0;
for n=1:1:10000
p=((-1)^(n+1)*sin(n*pi*x))/n;
s=s+p;
end
f=(2/pi)*s;
plot(x,f)
final.jpg