Convolución

Páginas: 2 (487 palabras) Publicado: 5 de noviembre de 2014
CONVOLUCIÓN
Resumen—Esta tarea se realiza la operación de convolución
mediante un script de Matlab sin utilizar la formula ya incluida en
la paquetería del software, así también se demuestra lapropiedad
asociativa de la operación convolución

CONVOLUCIÓN MEDIANTE MATLAB
Código de implementación,

%GENERAR FUNCION x[n] DE 10
ALEATORIOS CON AMPLITUD DE 0 A 5
for i=1:10x(i)=round(rand(1)*5);
end

VALORES

%GENERAR FUNCION h[n] DE 20
ALEATORIOS CON AMPLITUD DE 0 A 5
for i=1:20
h(i)=round(rand(1)*5);
end;

VALORES

end
%GRAFICA DE SEÑALES x[n],h[n],y[n]
figure(1)stem(xN);grid;ylabel('Amplitud');xlabel('T
iempo');title('Señal x[n]')
figure(2);
stem(hN);
grid;ylabel('Amplitud');xlabel('Tiempo');t
itle('Señal h[n]')
figure(3);
stem(A);grid;ylabel('Amplitud');xlabel('Tiempo');t
itle('Señal y[n]')
%CONVOLUCIÓN CON FUNCIÓ
N CONV DE MATLAB
p=conv(xN,hN);
figure(4);
stem(p);
grid;ylabel('Amplitud');xlabel('Tiempo');t
itle('Señal y[n]')
Señal x[n]
5%SE OBTIENE LA LONGITUD DE LOS VECTORES
n=length(x);
k=length(h);

4.5
4
3.5
3

Amplitud

%SE COMPLETA PARA QUE TENGAN LA MISMA
LONGITUD LOS VECTORES
xN=[x, zeros(1,k)];hN=[h,zeros(1,n)];

2.5
2

%OPERACION DE CONVOLUCIÓN
for j =1: n+ k -1
cnv(j) = 0;
for i=1:n
if(j - i+1> 0)
cnv(j) = cnv(j) + xN(i)*hN(j
-i+1);
A(j) = cnv(j);
else
end
end

1.5
1
0.5
0
0

510

15
Tiempo

20

25

Figura 1.- Señal x[n] generada de manera aleatoria con 10
elementos.

30

Señal h[n]

Señal y[n]

5

90

4.5

80

4

70

3.5
60

AmplitudAmplitud

3
2.5

50
40

2
30
1.5
1

20

0.5

10

0

0
0

5

10

15
Tiempo

20

25

30

0

5

10

15
Tiempo

20

25

30

Figura 2.- Señal h[n]generada de manera aleatoria con 20 valores
Figura 6.- Señal de convolución y[n]=x[n]*h[n], realizada con el
operador conv ajustada en tiempo.

Señal y[n]
80
70
60

DEMOSTRACION DE LA PROPIEDAD...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Convolucion
  • Convolucion
  • Convolucion
  • convolucion
  • convolucion
  • Convolución
  • Convolucion
  • Convolucion

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS