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