Anda di halaman 1dari 16

UNIVERSIDAD NACIONAL

PEDRO RUIZ GALLO


INGENIERIA ELECTRONICA
TELECOMUNICACIONES I

RESOLUCIN DE LA PRCTICA CALIFICADA EN


MATLAB
Docente:
SEGURA ALTAMIRANO, FRANCISCO

Alumno:
ZAMORA VENTURA, JHOSSEP JOSSIMAR

Lambayeque, Abril 2014

I.

Representar en el dominio de la frecuencia.


1. CODIGO
fs=10000;
t=0:1/fs:6/100;
x=2+2*cos(2*pi*100*t)+(1/4)*sin(2*pi*400*t);
f=linspace(-fs/2,fs/2,length(t));
X=fft(x)/length(t);
stem(f,fftshift(abs(X))); xlim([-500 500]);
figure
stem(f,fftshift(angle(X)));
GRAFICO

2. CODIGO
fs=10000;
t=0:1/fs:6/100;
x=(1/2)+4*cos(2*pi*100*t)+2*sin(2*pi*100*t+(pi/4));
f=linspace(-fs/2,fs/2,length(t));
X=fft(x)/length(t);
stem(f,fftshift(abs(X))); xlim([-500 500]);
figure
stem(f,fftshift(angle(X)));

GRAFICO

3. CODIGO
fs=10000;
t=0:1/fs:6/100;
x=(1/4)+4*cos(2*pi*100*t)+(1/3)*cos(2*pi*200*t)+(1/5)*sin(2*pi*600*t);
f=linspace(-fs/2,fs/2,length(t));
X=fft(x)/length(t);
stem(f,fftshift(abs(X))); xlim([-500 500]);
figure
stem(f,fftshift(angle(X)));
GRAFICO

4. CODIGO
fs=10000;
t=0:1/fs:6/100;
x=-1+(1/2)*cos(2*pi*100*t).*sin(2*pi*100*t)+(1/2)*sin(2*pi*100*t)+(1/4)*cos(2*pi*200*t);
f=linspace(-fs/2,fs/2,length(t));
X=fft(x)/length(t);
stem(f,fftshift(abs(X))); xlim([-500 500]);
figure
stem(f,fftshift(angle(X)));
GRAFICO

5. CODIGO
fs=10000;
t=0:1/fs:6/100;
x=-2+(1/3)*cos(2*pi*100*t).*sin(2*pi*200*t)+(1/3)*sin(2*pi*300*t);
f=linspace(-fs/2,fs/2,length(t));
X=fft(x)/length(t);
stem(f,fftshift(abs(X))); xlim([-500 500]);
figure
stem(f,fftshift(angle(X)));
GRAFICO

6. CODIGO
fs=10000;
t=0:1/fs:6/100;
x=-(1/4)+(1/2)*cos(2*pi*100*t).*sin(2*pi*200*t+(pi/6))+(1/3)*cos(2*pi*100*t);
f=linspace(-fs/2,fs/2,length(t));
X=fft(x)/length(t);
stem(f,fftshift(abs(X))); xlim([-500 500]);
figure
stem(f,fftshift(angle(X)));
GRAFICO

II.

Realizar la transformacin de las variables independientes indicadas y las operaciones


de seal.
Primero creamos las funciones que vamos a usar:
function x=xdet(t)
x=1.*((t>=-1)-(t>=0))+(-t+2).*((t>=0)-(t>=1))+1.*((t>=1)-(t>=2))+(-t+3).*((t>=2)(t>=3));
t=-6:0.01:6;
f0=xdet(t);
g0=ydet(t);
figure(1)
subplot(2,1,1);
plot(t,f0);
title('Funcion x(t)');
grid;

function y=ydet(t)
y=-1.*((t>=-1)-(t>=0))+(-t-1).*((t>=0)-(t>=1))+(-1).*((t>=1)-(t>=2))+(t+2).*((t>=2)-(t>=3));
subplot(2,1,2);
plot(t,g0);
title('Funcion y(t)');
grid;

Ahora escribimos todo el commando para todas las operaciones de x(t) e y(t):
t=-6:0.01:6;
f0=xdet(t);
g0=ydet(t);
figure(1)
subplot(2,1,1);

plot(t,f0);
title('Funcion x(t)');
grid;
subplot(2,1,2);
plot(t,g0);
title('Funcion y(t)');
grid;
f1=xdet(t-2);
figure(2)
plot(t,f1);
title('Funcion x(t-2)');
grid;

f2=xdet(t+2);
figure(3)
plot(t,f2);
title('Funcion x(t+2)');
grid;

f3=xdet(t-2).*ydet(t-1);
figure(4)
plot(t,f3);
title('Funcion x(t-2)*y(t-1)');
grid;

f4=xdet((2*t)-3);
figure(5)
plot(t,f4);
title('Funcion x(2t-3)');
grid;

f5=xdet((2*t)+5);
figure(6)
plot(t,f5);
title('Funcion x(2t+5)');
grid;

f6=(xdet((-2*t)+3)).*ydet(-t);
figure(7)
plot(t,f6);
title('Funcion x(-2t+3)*y(-t)');
grid;

f7=(xdet(t-3)).*ydet(-t+3);
figure(8)
plot(t,f7);
title('Funcion x(t-3)*y(-t+3)');
grid;

Sabiendo la forma de cada una de las funciones x(t) e y(t); las vamos a representar en
forma de escaln unitario de la siguiente manera, para facilitar su uso en MATLAB.
Usando los siguientes cdigos en MATLAB:
%x(t)
t=linspace(-6,6,1000);
escalon=heaviside((t)+1)-heaviside((t)-3);
subplot(2,1,1)
plot(t,escalon);
ylim([-2 2]);
grid;
%y(t)
t=linspace(-6,6,1000);
escalon=-heaviside((t)+1)+heaviside((t)-3);
subplot(2,1,2)
plot(t,escalon);
ylim([-2 2])
grid;

a.

x(t-2)
%x(t)
t=linspace(-6,6,1000);
escalon=heaviside((t-2)+1)-heaviside((t-2)-3);
plot(t,escalon);
ylim([-2 2]);
grid;

b. x(t+2)
%x(t)
t=linspace(-6,6,1000);
escalon=heaviside((t+2)+1)-heaviside((t+2)-3);
plot(t,escalon);
ylim([-2 2]);
grid;

c. x(t-2)*y(-t)
t=linspace(-6,6,1000);
escalon=heaviside((t-2)+1)-heaviside((t-2)-3);
escalon2=-heaviside((t-1)+1)+heaviside((t-1)-3);
escalon3=escalon.*escalon2;
plot(t,escalon3);
ylim([-2 2]);
grid;

d. x(2t-3)
t=linspace(-6,6,1000);
escalon=heaviside((2*t-3)+1)-heaviside((2*t-3)-3);
plot(t,escalon);
ylim([-2 2]);
grid;

e. x(2t+5)
t=linspace(-6,6,1000);
escalon=heaviside((2*t+5)+1)-heaviside((2*t+5)-3);
plot(t,escalon);
ylim([-2 2]);
grid;

f.

x(-2t+3)*y(-t)
t=linspace(-6,6,1000);
escalon=heaviside((-2*t+3)+1)-heaviside((-2*t+3)-3);
escalon2=-heaviside((-t)+1)+heaviside((-t)-3);
escalon3=escalon.*escalon2;
plot(t,escalon3);
ylim([-2 2]);
grid;

g. x(t-3)*y(-t+3)
t=linspace(-8,8,1000);
escalon=heaviside((t-3)+1)-heaviside((t-3)-3);
escalon2=-heaviside((t-3)+1)+heaviside((t-3)-3);
escalon3=escalon.*escalon2;
plot(t,escalon3);
ylim([-2 2]);

grid;

III.

Dibujar el espectro de:


x(t)=
1.

para en la misma grfica. (Para graficar suponemos A=1)

=
To=4;
tao=1;
f=1/(4);
wo=2*pi*f;
A=1;
p=-20:20;
Cn=A*(tao/To)*sinc(p*wo*tao/(2*pi));
stem(p,abs(Cn))
grid

2.

= 1/10
To=10;
tao=1;
f=1/(To);
wo=2*pi*f;
A=1;
p=-100:100;
Cn=A*(tao/To)*sinc(p*wo*tao/(2*pi));
stem(p,abs(Cn))

Anda mungkin juga menyukai