PUSH BUTTON CODE
N = int; % number inserted in “edit text”
Wo = pi/5; t = -1:.001:11;
f = zeros(1,length(t));
for n = 1:2:N an = 4/(pi*n);
f = f+ an*sin(Wo*n*t); end
plot(t,f)
axis([-1 11 -1.1 1.1])
title('GRAPH OF X(t)')
xlabel('Time')
ylabel('f(t)')
Best Answer