신시 프로젝트1 그래프 캡쳐(001분반_7조_유호현_이연택).zip
N =10
t=0:0.005:2;
N=10;
x_n=0;
for n=1:2:N
x_n=x_n+(4/pi)*(1/n)*sin(n*pi*t);
end
plot(t,x_n);
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$\\hat{x}_N$$(t)','Interpreter','Latex','FontSize',15)
N = 20
t=0:0.005:2;
N=20;
x_n=0;
for n=1:2:N
x_n=x_n+(4/pi)*(1/n)*sin(n*pi*t);
end
plot(t,x_n);
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$\\hat{x}_N$$(t)','Interpreter','Latex','FontSize',15)
N = 100
t=0:0.005:2;
N=100;
x_n=0;
for n=1:2:N
x_n=x_n+(4/pi)*(1/n)*sin(n*pi*t);
end
plot(t,x_n);
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$\\hat{x}_N$$(t)','Interpreter','Latex','FontSize',15)
N = 500
t=0:0.005:2;
N=500;
x_n=0;
for n=1:2:N
x_n=x_n+(4/pi)*(1/n)*sin(n*pi*t);
end
plot(t,x_n);
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$\\hat{x}_N$$(t)','Interpreter','Latex','FontSize',15)
N = 10
t=0:0.005:2;
N=10;
x=square(pi*t);
x_N=0;
for n=1:2:N
x_N=x_N+(4/pi)*(1/n)*sin(n*pi*t);
end
e_N = x - x_N;
plot(t,e_N);
xlim([-0.05 2.05])
ylim([-1.05 1.05])
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$e_N$$(t)','Interpreter','Latex','FontSize',15)
N = 20
t=0:0.005:2;
N=20;
x=square(pi*t);
x_N=0;
for n=1:2:N
x_N=x_N+(4/pi)*(1/n)*sin(n*pi*t);
end
e_N = x - x_N;
plot(t,e_N);
xlim([-0.05 2.05])
ylim([-1.05 1.05])
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$e_N$$(t)','Interpreter','Latex','FontSize',15)
N =100
t=0:0.005:2;
N=100;
x=square(pi*t);
x_N=0;
for n=1:2:N
x_N=x_N+(4/pi)*(1/n)*sin(n*pi*t);
end
e_N = x - x_N;
plot(t,e_N);
xlim([-0.05 2.05])
ylim([-1.05 1.05])
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$e_N$$(t)','Interpreter','Latex','FontSize',15)
N = 500
t=0:0.005:2;
N=500;
x=square(pi*t);
x_N=0;
for n=1:2:N
x_N=x_N+(4/pi)*(1/n)*sin(n*pi*t);
end
e_N = x - x_N;
plot(t,e_N);
xlim([-0.05 2.05])
ylim([-1.05 1.05])
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$e_N$$(t)','Interpreter','Latex','FontSize',15)
N = 10
t=0:0.005:2;
N=10;
x=square(pi*t);
x_N=0;
for n=1:2:N
x_N=x_N+(4/pi)*(1/n)*sin(n*pi*t);
end
e_N = abs(x - x_N);
plot(t,e_N);
xlim([-0.05 2.05])
ylim([-0.05 1.05])
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$|e_N$$(t)$$|$$','Interpreter','Latex','FontSize',15)
N = 20
t=0:0.005:2;
N=20;
x=square(pi*t);
x_N=0;
for n=1:2:N
x_N=x_N+(4/pi)*(1/n)*sin(n*pi*t);
end
e_N = abs(x - x_N);
plot(t,e_N);
xlim([-0.05 2.05])
ylim([-0.05 1.05])
xlabel('t','Interpreter','Latex','FontSize',15)
ylabel('$$|e_N$$(t)$$|$$','Interpreter','Latex','FontSize',15)