Eduardo Pérez Dawn
Eduardo Pérez Dawn
3.3
(a)
clc
clear all
t=[1:0.001:10];
ft=1;
for n=1:100
ft=ft+(3/(pi*n)).*sin((4*pi*n)/3).*cos((2.*pi.*t.*n)
/3)+(9/(2*pi*n)).*(sin((2.*pi.*t.*n)/3))-
((3)/(2*pi*n)).*sin((2.*pi.*t.*n));
end
plot(t,ft); grid on;
(b)
clc
clear all
t=[1:0.001:10];
ft=1;
for n=1:100
ft=ft+(2/(n*pi)).*sin((pi).*n.*t);
end
plot(t,ft); grid on;
Eduardo Prez Dawn
(c)
clc
close
clear all
t=[0:0.001:10];
ft=3/2;
for n=1:100
ft=ft-(4/(pi*(2*n-1))^2).*cos((pi/2).*(2*n-1).*t)-
(2/(pi*n)).*sin((pi/2).*n.*t);
end
plot(t,ft); grid on;
Eduardo Prez Dawn
(d)
clc
clear all
t=[1:0.001:10];
ft=0;
for n=1:100
ft=ft+(6/pi).*(((-1)^(n-
1))/n.*sin((n.*pi.*t)/3)+(1/(3*n).*sin(n.*pi.*t)));
end
plot(t,ft); grid on;
(e)
clc
close
clear all
t=[-2:0.001:10];
ft=1/2;
for n=1:100
ft=ft+(4/(pi*(2*n-1))^2).*cos((pi/2).*(2*n-1).*t);
end
plot(t,ft); grid on;
Eduardo Prez Dawn
(f)
clc
close
clear all
t=[-1:0.0125:5];
ft=2/3;
for n=1:1000
ft=ft+((-3/(2*pi^2*n^2))-
(3/(n^2*pi^2))).*cos((8/3)*n*t*pi)+((1/(2*pi^2*n^2))
).*cos((8)*n*t*pi);
end
plot(t,ft); grid on;
Eduardo Prez Dawn
(g)
clc
clear all
t=[0:0.001:10];
ft=1/2;
for n=1:100
ft=ft+(4/(pi^2*(2*n-1)^2)).*cos((2*n-1).*pi.*t)-
(2/(n*pi)).*sin(n*pi*t);
end
plot(t,ft); grid on;
3.16
(a)
clc
close
clear all
t=[-2:0.001:10];
ft=5/4;
for n=1:1000
ft=ft+3/pi*(1/(4*n-3))*cos((pi/2)*(4*n-3)*t)-
3/pi*(1/(4*n-1))*cos((pi/2)*(4*n-1)*t)+((-1)^(n-
1)/(pi*n))*sin((pi/2)*n*t)+ ((-
1)^n/(pi*2*n))*sin(pi*n*t);
end
plot(t,ft); grid on;
Eduardo Prez Dawn
(b)
clc
close
clear all
t=[-2:0.001:10];
ft=1;
for n=1:10000
ft=ft+((4/(n*pi)).*sin((4*pi*n)/5)+(5/(n^2*pi^2)).*(
cos((4*pi*n)/5)-cos((2*pi*n)/5))).*cos((2*pi*n*t)/5)
end
plot(t,ft); grid on;
(c)
Eduardo Prez Dawn
clc
close
clear all
t=[-2:0.001:10];
ft=5/4;
for n=1:100
ft=ft+(4/(n^2*pi^2))*(-
1)^n.*cos((n*pi*t)/2)+(1/(n^2*pi^2))*(-1)^(n-
1).*cos(pi*n*t);
end
plot(t,ft); grid on;