Post on 27-Dec-2015
ALUMNA:
CANCHARI LA ROSA SAYUMI
PROFESOR:
VELASQUEZ MACHUCA
2014
sayumi canchari la rosa
UNTELS
19-7-2014
CONVOLUCION DISCRETA
CONVOLUCION DISCRETA
EXPERIMENTO 1
clc clear pause on x=[2,2,-1,-1,1,1]; stem(x); figure h=[4,5,3,2,1]; stem(h) figure y=conv(x,h) stem(y)
EXPERIMENTO 2:
clc clear pause on x=[0 1 2 3 4 3 2 1 0]; stem(x); figure h=[1 1 1 1 1 1 1 1 1]; stem(h) figure y=conv(x,h) stem(y)
EXPERIMENTO 3
n=[0:1:25]; b=[0,0,2]; stem(n) figure stem(b) figure a=[1,-1.50,1]; stem(a) h=impz(b,a,n); figure
stem(h) x=heaviside(n); figure stem(x) y=conv(x,h); k=[0:1:50]; stem(k,y,'r','filled','linewidth',1),grid figure
EXPERIMENTO 4 :
x=[1 1 1 1 1 1]; h=[1 1 0 0 0 1 1 2]; m=length(x); n=length(h); hi =fliplr(h); k=20; X=[x,zeros(1,40-m)]; X=X([end-k+1:end 1:end-k]); H=[h,zeros(1,40-n)]; H=H([ end-k+1:end 1:end-k]); xn=-20:20-1; Y=zeros(1,40); p=zeros(1,40); h1=subplot(3,1,1); stem(xn,X,'markerFaceColor','red') h2=subplot(3,1,2); stem(xn,H,'MarkerFaceColor','blue') pause(3); h2=subplot(3,1,3); stem(xn,Y,'MarkerFaceColor','green') Hi=[hi,zeros(1,40-n)]; for i=1:40-n p=X.Hi; Y(i+n-1)=sum(p); subplot(3,1,2); stem(xn,Hi,'MarkerFaceColor','blue') subplot(3,1,3) stem(xn,Y,'r','MarkerFaceColor','green') Hi=Hi([end 1:end-1]); pause(0.5) end pause off salida=Y(abs(Y)>0); salida2=conv(x,h); [salida',salida2'] clc clear
pause on
EJERCICIOS
a)x1*h1+x1*h2
x=[1 2 2 2 2 0 0 0]; stem(x); figure h=[-1 1 2 0 0 0 0 0 ]; stem(h); figure; k=[0 1 2 3 -1 0 0 0]; y=conv(x,h); figure; stem(y); j=conv(x,k); figure stem(j)
AQUI LAS 2 FORMAS DE ONDAS DISCRETE:
x1*h1
x1*h2
x1*h1+x1*h2:
x1*(h1+h2)
x=[1 2 2 2 2 0 0 0]; stem(x); figure h=[-1 1 2 0 0 0 0 0 ]; stem(h); figure; k=[0 1 2 3 -1 0 0 0]; y=conv(x,h); figure; stem(y); j=conv(x,k); figure stem(j) a=h+k; m=conv(x,a); figure stem(m);
b) x1*(h1*h2)=
clc clear pause on x=[1 2 2 2 2 0 0 0]; stem(x); figure h=[-1 1 2 0 0 0 0 0]; stem(h); figure; k=[0 1 2 3 -1 0 0 0]; y=conv(x,h); stem(y); figure
j=conv(x,k); stem(j) figure m=conv(h,k); n=conv(x,m); figure stem(n);
x1*(h1*h2): clc clear pause on x=[1 2 2 2 2 0 0 0]; stem(x); figure h=[-1 1 2 0 0 0 0 0]; stem(h); figure; k=[0 1 2 3 -1 0 0 0]; y=conv(x,h); stem(y); figure j=conv(x,k); stem(j) figure m=conv(x,h); n=conv(m,k); figure stem(n);
(x1*h2)*x1:
clc clear pause on x=[1 2 2 2 2 0 0 0]; stem(x); figure h=[-1 1 2 0 0 0 0 0]; stem(h); figure; k=[0 1 2 3 -1 0 0 0]; y=conv(x,h); stem(y); figure j=conv(x,k); stem(j) figure m=conv(x,k); n=conv(m,x); figure stem(n);
Conclusiones
La herramienta matlab es muy versátil y potente software para realizar este trabajo como es
hacer la convolucion discreta.