Sunteți pe pagina 1din 8

UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS

Universidad del Per, DECANA DE AMERICA


FACULTAD DE INGENIERIA ELECTRICA Y ELECTRONICA

CURSO: Laboratorio de Introduccin a las telecomunicaciones.
PROFESOR: Sixto Llosa.
CICLO: VI ciclo (2014 II).
TEMA: Convolucin de seales sencillas usando Matlab.
TIPO DE INFORME: Cuarto informe final.
NOMBRE: Ramos Acosta Juan Gian Paul.
CODIGO: 12190110.
FECHA: 22 de Setiembre del 2014.

UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS

LABORATORIO DE INTRODUCCION A LAS TELECOMUNICACIONES Pgina 2

SIMULACION EN MATLAB

Realizamos la simulacin de funciones bsicas en Matlab. Abrimos un nuevo archivo y
colocamos los cdigos

Primero creamos una funcin en el editor insertando el siguiente cdigo y guardndolo
como funcin

function[y,X]=myconv(x,h)
%esta funcion evalua la convolucion de dos funciones finitas
x=x(:);
h=h(:);
nx=length(x);
nh=length(h);
ny=nx+nh-1;
X=zeros(nh,ny)';
for i=1:nh
X((1:nx)+(i-1),i)=x;
end
y=X*h;
y=y(1:1:ny);
y=y/max(abs(y));

Guardamos los archivos como myconv.

EJERCICIO 1

>> t=-5:0.1:5; % base de tiempo de x
L=length(t); % longitud
p1=find(t==-1);
p2=find(t==1); %localizar los puntos
x=zeros(1,L);
x(p1:p2)=1;% pulso entre -1 y 1
figure(1)
plot(t,x)
h=x; %h es igual a x



UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS

LABORATORIO DE INTRODUCCION A LAS TELECOMUNICACIONES Pgina 3

figure(2)
plot(t,h)
y=myconv(h,x);% usamos la funcion creada
w=-10:0.1:10;% base de tiempo de y



figure(3)
plot(w,y)


EJERCICIO 2

>> p3=find(t==-5);
p4=find(t==0);
p5=find(t==2);
u=zeros(1,L);
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS

LABORATORIO DE INTRODUCCION A LAS TELECOMUNICACIONES Pgina 4

x(p3:p4)=t(p3:p4)/2+1;
x(p4:p5)=t(p4:p5)/2+1;
figure(4)
plot(t,x)
h=zeros(1,L);
h(p4:p5)=1;



figure(5)
plot(t,h)
y=myconv(h,x);



figure(6)
plot(w,y)

UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS

LABORATORIO DE INTRODUCCION A LAS TELECOMUNICACIONES Pgina 5


EJERCICIO 3

>> p6=find(t==5);
u=zeros(1,L);
u(p4:p6)=1;
figure(7)
plot(t,u)
x=(3/2)*exp(-3*t/2).*u;



figure(8)
plot(t,x)
y=myconv(h,x);

UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS

LABORATORIO DE INTRODUCCION A LAS TELECOMUNICACIONES Pgina 6



figure(9)
plot(w,y)


EJERCICIO 4

>> h=u;
figure(10)
plot(10)
plot(t,h)
y=myconv(h,x);

UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS

LABORATORIO DE INTRODUCCION A LAS TELECOMUNICACIONES Pgina 7



figure(11)
plot(w,y)


EJERCICIO 5

>> h=cos(2*pi*t);
figure(12)
plot(t,h)
y=myconv(h,x);

UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS

LABORATORIO DE INTRODUCCION A LAS TELECOMUNICACIONES Pgina 8



figure(13)
plot(w,y)

S-ar putea să vă placă și