Sei sulla pagina 1di 5

2.2.

Ejercicio 2 - operaciones básicas en señales discretas


(Desplazamiento, reflexión y amplificación): estudiando en el libro de
(Ambardar), sea [𝑛]={−1,4,3,4,−1,3}, dibuje las siguientes señales y
determine su energía. Posteriormente verifique sus respuestas diseñando
un script en Matlab u Octave y anexando el resultado junto con el script
(práctica)::

a) 𝑝[𝑛]=𝑥[𝑛−𝑏]

% Grafica p(t) - Oscar Sanchez Puche


% p[n]= x[n-b]
% x[n]={-1,4,(3?),4,-1,3}

% SEÑAL A TRABAJAR
close all
a=3;
b=9;
n=[-2,-1,0,1,2,3];
amp=[-1, 4, 3, 4, -1, 3];
subplot(2,1,1)
stem(n,amp,'b')
grid
title('Señal discreta - Oscar Sanchez p[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-3,8])
ylim([-2,5])

%DESPLAZAMIENTO

n1=n+9;
amp=[-1, 4, 3, 4, -1, 3];
subplot(2,1,2)
stem(n1,amp,'r')
grid
title('Señal discreta - Oscar Sanchez p[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([0,13])
ylim([-2,5])
b) 𝑦[𝑛]=𝑏𝑥[−𝑛]

% Grafica p(t) - Oscar Sanchez Puche


% y[n]= bx[-n]
% x[n]={-1,4,(3?),4,-1,3}

% SEÑAL A TRABAJAR
close all
a=3;
b=9;
n=[-2,-1,0,1,2,3];
amp=[-1, 4, 3, 4, -1, 3];
subplot(3,1,1)
stem(n,amp,'b')
grid
title('Señal discreta - Oscar Sanchez y[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-5,5])
ylim([-2,5])

%REFLEXION

amp=[-1, 4, 3, 4, -1, 3];


n1=n*(-1);
subplot(3,1,2)
stem(n1,amp,'r')
grid
title('Señal discreta - Oscar Sanchez y[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-5,5])
ylim([-2,5])

% EXPANCION

amp1=amp*9;
subplot(3,1,3)
stem(n1,amp1,'g')
grid
title('Señal discreta - Oscar Sanchez Y[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-5,5])
ylim([-20,40])

c) 𝑧[𝑛]=−𝑥[−𝑎𝑛+2]

% Grafica p(t) - Oscar Sanchez Puche


% z[n]=-x[-an+2]
% x[n]={-1,4,(3),4,-1,3}

% SEÑAL A TRABAJAR
close all
a=3;
b=9;
n=[-2,-1,0,1,2,3];
amp=[-1, 4, 3, 4, -1, 3];
subplot(5,1,1)
stem(n,amp,'b')
grid
title('Señal discreta - Oscar Sanchez z[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-5,5])
ylim([-2,5])

%DESPLAZAMIENTO

amp=[-1, 4, 3, 4, -1, 3];


n1=n-2;
subplot(5,1,2)
stem(n1,amp,'r')
grid
title('Señal discreta - Oscar Sanchez z[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-5,5])
ylim([-2,5])

%REFLEXION

amp=[-1, 4, 3, 4, -1, 3];


n2=n1*-1;
subplot(5,1,3)
stem(n2,amp,'y')
grid
title('Señal discreta - Oscar Sanchez z[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-5,5])
ylim([-2,5])

% ESCALAMIENTO

amp=[-1, 4, 3, 4, -1, 3];


n3=n2/a;
subplot(5,1,4)
stem(n3,amp,'g')
grid
title('Señal discreta - Oscar Sanchez z[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-1,2])
ylim([-2,5])

% AMPLITUD

amp1=amp*(-1);
n3=n2/a;
subplot(5,1,5)
stem(n3,amp1,'black')
grid
title('Señal discreta - Oscar Sanchez z[n]')
xlabel('Tiempo (n)')
ylabel('Amplitud')
xlim([-1,2])
ylim([-5,2])

Se determina la Energia

𝐸 = ∑ |𝑥[𝑛]|2
𝑘=−∞

𝐸 = (−1)2 + (4)2 + (3)2 + (4)2 + (−1)2 + (3)2

𝐸 = 52 𝑗

Potrebbero piacerti anche