You are on page 1of 6

# ANALISIS DE SEALES

## NOMBRE: Juan Villacis

CODIGO: 298

1. SCRIPT

%% figure 1
a=figure;
t=0:.1:10
y=4*sin(t)/pi;
subplot(3,1,1);
plot(t,y);
title('Primer armonico');
y=(4/pi)*[sin(3*t)/3];
subplot(3,1,2);
plot(t,y,'g');
title('Segundo armonico armonico');
y=(4/pi)*[sin(5*t)/5];
subplot(3,1,3)
plot(t,y,'+');
title('Tercer armonico');
hold on
GRAFICA DE LOS ARMONICOS

%% figure 2
b=figure;
y4=(4/pi)*[sin(t)+sin(3*t)/3+sin(5*t)/5];
subplot(1,2,1)
plot(t,y4,'r');
title('Sumatoria de armonicos')
subplot(1,2,2)
y=4*sin(t)/pi;
plot(t,y)
title('TODAS LAS GRAFICAS');
hold on
%el segundo armonico en verde
y=(4/pi)*[sin(3*t)/3];
hold on
plot(t,y,'g')
%el tercer armonico en ++++
y=(4/pi)*[sin(5*t)/5];
hold on
plot(t,y,'+')
%la resultante en rojo,al sumar las armonicas, de la seal cuadrada.
%siga sumando hasta 10 armonicos y observe que la resultante que se aparece mas
y=(4/pi)*[sin(t)+sin(3*t)/3+sin(5*t)/5];
plot(t,y,'r')
%% figure 3
c=figure;
GRIFAC DE LA SUMATIOR Y TODAS LAS GRAFICAS

## %SERIE DE FOURIER PARA SEAL TRIANGULAR

t=0:0.1:15;
y=1/2-sin(t)/pi;
subplot(2,2,1)
plot(t,y,'g')
title('Primer armonico');
hold on
y=1/2-sin(2*t)/(2*pi);
subplot(2,2,2)
plot(t,y,'b')
title('Segundo armonico armonico');
hold on
y=1/2-sin(3*t)/(3*pi);
subplot(2,2,3)
plot(t,y,'r')
title('Tercer armonico');
hold on
y=1/2-sin(4*t)/(4*pi);
subplot(2,2,4)
plot(t,y,'g')
title('Cuarto armonico');
hold on

## GRAFICA DE LOS ARMONICOS DE UNA SEAL TRIANGULAR

%% figure 4
d=figure
y=1/2-sin(t)/pi-sin(2*t)/(2*pi)-sin(3*t)/(3*pi)-sin(4*t)/(4*pi);
subplot(1,2,1)
plot(t,y,'b')
title('Sumatoria de armonicos')
subplot(1,2,2)
t=0:0.1:15;
y=1/2-sin(t)/pi;
plot(t,y,'g')
hold on
y=1/2-sin(2*t)/(2*pi);
plot(t,y,'b')
hold on
y=1/2-sin(3*t)/(3*pi);
plot(t,y,'r')
hold on
y=1/2-sin(4*t)/(4*pi);
plot(t,y,'g')
hold on
y=1/2-sin(t)/pi-sin(2*t)/(2*pi)-sin(3*t)/(3*pi)-sin(4*t)/(4*pi);
plot(t,y,'b')
title('GRAFICA TOTAL')
%% CLOSE

## GRAFICO DE LA SUMATORIA DE ARMONICOS Y GRAFICA TOTAL

SEAL CUALESQIERA
%% FIGURE 5
e=figure;
t=0:.1:10;
y=(((sin((2/3)*t)))/3*pi)-((cos(2*t))/((2)*pi));
subplot(4,1,1)
plot(t,y,'black')
title('Primer armonico');
hold on
y=(((sin((4/3)*t)))/6*pi)-((cos(4*t))/((4)*pi));
subplot(4,1,2)
plot(t,y,'g')
title('Segundo armonico');
hold on
y=(((sin((10/3)*t)))/15*pi)-((cos(10*t))/((10)*pi));
subplot(4,1,3)
plot(t,y,'r')
title('Tercer armonico');
hold on
y=(((sin((14/3)*t)))/21*pi)-((cos(14*t))/((14)*pi));
subplot(4,1,4)
plot(t,y,'c')
title('Cuarto armonico');
hold on

## GRAFICAS DE LOS ARMONICOS

%% FIGURE 6
f=figure;
y=(((sin((2/3)*t)))/3*pi)-((cos(2*t))/((2)*pi)) + (((sin((4/3)*t)))/6*pi)((cos(4*t))/((4)*pi))+(((sin((10/3)*t)))/15*pi)((cos(10*t))/((10)*pi))+(((sin((14/3)*t)))/21*pi)-((cos(14*t))/((14)*pi));
subplot(2,1,1)
plot(t,y,'b')
title('Sumatoria de armonicos');
hold on
subplot(2,1,2)
y=(((sin((2/3)*t)))/3*pi)-((cos(2*t))/((2)*pi));
plot(t,y,'black')
hold on
y=(((sin((4/3)*t)))/6*pi)-((cos(4*t))/((4)*pi));
plot(t,y,'g')
hold on
y=(((sin((10/3)*t)))/15*pi)-((cos(10*t))/((10)*pi));
plot(t,y,'r')
hold on
y=(((sin((14/3)*t)))/21*pi)-((cos(14*t))/((14)*pi));
plot(t,y,'c')
hold on
y=(((sin((2/3)*t)))/3*pi)-((cos(2*t))/((2)*pi)) + (((sin((4/3)*t)))/6*pi)((cos(4*t))/((4)*pi))+(((sin((10/3)*t)))/15*pi)((cos(10*t))/((10)*pi))+(((sin((14/3)*t)))/21*pi)-((cos(14*t))/((14)*pi));
plot(t,y,'b')
title('GRAFICA TOTAL');
hold on
%%