Está en la página 1de 10

HCTOR GUILLERMO ESPINOSA ACEVEDO

5CV4

HCTOR GUILLERMO ESPINOSA ACEVEDO


5CV4

HCTOR GUILLERMO ESPINOSA ACEVEDO


5CV4

t=0:1/100:4;
f0=0.5;
cnte=j/(2*pi);
c1=exp(j*2*pi*t);
c1c=exp(-j*2*pi*t);
c1s=cnte*(c1-c1c);
c1r=real(c1s);
c1t=f0+c1r;
subplot(3,4,1)
plot(t,c1t)
title('Fundamental')
grid();
axis([0 4 0 1]);
%----------------------------------------------------c2=exp(j*2*pi*t*2);
c2c=exp(-j*2*pi*t*2);
c2s=cnte*(c2-c2c)/2;
c2r=real(c2s);
subplot(3,4,2)
plot(t,c2r)
title({'Segundo';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c2t=c1t+c2r;
subplot(3,4,3)
plot(t,c2t)
title({'Aproximacin con';'dos armnicos'})
grid();
axis([0 4 0 1]);
%----------------------------------------------------c3=exp(j*2*pi*t*3);
c3c=exp(-j*2*pi*t*3);
c3s=cnte*(c3-c3c)/3;
c3r=real(c3s);
subplot(3,4,4)
plot(t,c3r)
title({'Tercer';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c3t=c2t+c3r;
subplot(3,4,5)
plot(t,c3t)
title({'Aproximacin con';'tres armnicos'})
grid();
axis([0 4 0 1]);
%-----------------------------------------------------

HCTOR GUILLERMO ESPINOSA ACEVEDO


5CV4

c4=exp(j*2*pi*t*4);
c4c=exp(-j*2*pi*t*4);
c4s=cnte*(c4-c4c)/4;
c4r=real(c4s);
subplot(3,4,6)
plot(t,c4r)
title({'Cuarto';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c4t=c3t+c4r;
subplot(3,4,7)
plot(t,c4t)
title({'Aproximacin con';'cuatro armnicos'})
grid();
axis([0 4 0 1]);
%----------------------------------------------------c5=exp(j*2*pi*t*5);
c5c=exp(-j*2*pi*t*5);
c5s=cnte*(c5-c5c)/5;
c5r=real(c5s);
subplot(3,4,8)
plot(t,c5r)
title({'Quinto';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c5t=c4t+c5r;
subplot(3,4,9)
plot(t,c5t)
title({'Aproximacin con';'cinco armnicos'})
grid();
axis([0 4 0 1]);
%----------------------------------------------------c6=exp(j*2*pi*t*6);
c6c=exp(-j*2*pi*t*6);
c6s=cnte*(c6-c6c)/6;
c6r=real(c6s);
subplot(3,4,10)
plot(t,c6r)
title({'Sexto';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c6t=c5t+c6r;
subplot(3,4,11)
plot(t,c6t)
title({'Aproximacin con';'seis armnicos'})
axis([0 4 0 1]);
%----------------------------------------------------c7t=t;
subplot(3,4,12)
plot(t,c7t)
title({'Funcin Original';'f(t)=t'},'color','b')
HCTOR GUILLERMO ESPINOSA ACEVEDO
5CV4

grid();
axis([0 1 0 1]);

HCTOR GUILLERMO ESPINOSA ACEVEDO


5CV4

HCTOR GUILLERMO ESPINOSA ACEVEDO


5CV4

figure();
t=0:1/100:4;
f0=0.5;
cnte=-2/(3*pi);
c1=exp(j*2*pi*t);
c1c=exp(-j*2*pi*t);
c1s=cnte*(c1+c1c);
c1r=real(c1s);
c1t=f0+c1r;
subplot(3,4,1)
plot(t,c1t)
title('Fundamental')
grid();
axis([0 4 0 1]);
%----------------------------------------------------cnte=-2/(15*pi)
c2=exp(j*2*pi*t*2);
c2c=exp(-j*2*pi*t*2);
c2s=cnte*(c2+c2c);
c2r=real(c2s);
subplot(3,4,2)
plot(t,c2r)
title({'Segundo';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c2t=c1t+c2r;
subplot(3,4,3)
plot(t,c2t)
title({'Aproximacin con';'dos armnicos'})
grid();
axis([0 4 0 1]);
%----------------------------------------------------cnte=-2/(35*pi);
c3=exp(j*2*pi*t*3);
c3c=exp(-j*2*pi*t*3);
c3s=cnte*(c3+c3c);
c3r=real(c3s);
subplot(3,4,4)
plot(t,c3r)
title({'Tercer';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c3t=c2t+c3r;
subplot(3,4,5)
plot(t,c3t)
title({'Aproximacin con';'tres armnicos'})
grid();
axis([0 4 0 1]);
%-----------------------------------------------------

HCTOR GUILLERMO ESPINOSA ACEVEDO


5CV4

cnte=-2/(63*pi);
c4=exp(j*2*pi*t*4);
c4c=exp(-j*2*pi*t*4);
c4s=cnte*(c4+c4c);
c4r=real(c4s);
subplot(3,4,6)
plot(t,c4r)
title({'Cuarto';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c4t=c3t+c4r;
subplot(3,4,7)
plot(t,c4t)
title({'Aproximacin con';'cuatro armnicos'})
grid();
axis([0 4 0 1]);
%----------------------------------------------------cnte=-2/(99*pi);
c5=exp(j*2*pi*t*5);
c5c=exp(-j*2*pi*t*5);
c5s=cnte*(c5+c5c);
c5r=real(c5s);
subplot(3,4,8)
plot(t,c5r)
title({'Quinto';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c5t=c4t+c5r;
subplot(3,4,9)
plot(t,c5t)
title({'Aproximacin con';'cinco armnicos'})
grid();
axis([0 4 0 1]);
%----------------------------------------------------cnte=-2/(143*pi);
c6=exp(j*2*pi*t*6);
c6c=exp(-j*2*pi*t*6);
c6s=cnte*(c6+c6c);
c6r=real(c6s);
subplot(3,4,10)
plot(t,c6r)
title({'Sexto';'Armnico'})
grid();
axis([0 4 -0.3 0.3]);
%----------------------------------------------------c6t=c5t+c6r;
subplot(3,4,11)
plot(t,c6t)
title({'Aproximacin con';'seis armnicos'})
grid();
axis([0 4 0 1]);
%----------------------------------------------------HCTOR GUILLERMO ESPINOSA ACEVEDO
5CV4

c7t=abs(sin (pi*t));
subplot(3,4,12)
plot(t,c7t)
title({'Funcin Original';'f(t)=|sin (\pi t)|'},'color','b')
grid();

HCTOR GUILLERMO ESPINOSA ACEVEDO


5CV4

También podría gustarte