Está en la página 1de 22

1ER LABORATORIO DE PROCESAMIENTO DIGITAL

DE LA SEAL
1. Seales peridicas, aperidicas y cuasi-peridicas

%2. Seales peridicas, aperidicas y cuasi-peridicas


%a.
t=[-50:0.2:50];
x=-2*sin(-0.2*t+(5*pi/3));
plot(t,x),grid on

%b.
figure (2)
n=[-50:1:50];
xn=-2*sin(-0.2*n+(5*pi/3));

stem(n,xn),grid on

%c
figure (3)
t=[-10:0.1:10];
x=(1/2)*sqrt((cos(2*t+(pi/4))));choche los que estan con sqrt esta
mal tienes que cambiarlo ,, me e guebeado,, plotea de Nuevo,,, creo
que el commando es exp. Porque el problema es exponencial no es
raz cuadrada.. suerte
plot(t,x),grid on

%d
figure (4)
t=[0:0.1:500];
x=(1/2)*cos(2*sqrt(t)+(pi/4));
plot(t,x),grid on

%e
figure (5)
t=[-50:0.1:50];
x=exp(j*(t/2)-pi);
plot3(real(x),imag(x),angle(x)),grid on
xlabel('Real');
ylabel('Imaginario');
zlabel('Fase');

%f
figure (6)
n=[0:50];
x=exp(j*(n/2)-pi);
%plot3(real(x),imag(x),angle(x),'r'),grid on
subplot(2,2,1);
stem(n,real(x)),grid on
title('Real');
subplot(2,2,2);
stem(n,imag(x)),grid on
title('Imaginario');
subplot(2,2,3);
stem(n,abs(x)),grid on
title('Modulo');
subplot(2,2,4);
stem(n,angle(x)),grid on
title('Fase');

%g
figure (7)
t=[-10:0.1:10];
x=2*cos(2*pi*t)+sin(10*t);
plot(t,x),grid on

%h
figure (8)
t=[-4:0.1:4];
x=2*cos(4*pi*t).*sin(12*pi*t);
plot(t,x),grid on
2

1.5

0.5

-0.5

-1

-1.5

-2
-4

-3

-2

-1

%i
figure (9)
n=[0:0.2:20];
x=cos(2*pi*sqrt(n));
stem(n,x),grid on

2. Manejo de seales VIC y VID

function x=trih(t)
x=(1+t).*(t>=-1 & t<1)+(3-t).*(t>=1 & t<=3);
function x=disx(n)
x=1.*(n>=0 & n<=4);
t=[-10:0.1:10];
h=(1+t).*(t>=-1 & t<1)+(3-t).*(t>=1 & t<=3);

n=[-10:1:10];
x=1.*(n>=0 & n<=4);
subplot(2,1,1);
plot(t,h),grid on
title('h(t)')
subplot(2,1,2);
stem(n,x),grid on
title('x(n)')

%a.
figure(2)
t=[-10:0.1:10];
h=trih(t+1);
plot(t,h),grid on
title('h(t+1)')

%b.
figure(3)
t=[-10:0.1:10];
h=trih((2*t)-3);
plot(t,h),grid on
title('h(2t-3)')

%c.
figure(4)
t=[-10:0.1:10];
h=2*trih((-1/2)*(t+10));
plot(t,h),grid on
title('c.')

%d.
figure(5)
t=[-10:0.1:10];
h=trih(t/2).*(disx(t+2)-disx(t-2));
plot(t,h),grid on
title('d.')

%e.
figure(6)
t=[0:0.1:20];
h=trih(sqrt(t));
plot(t,h),grid on
title('e.')

%f.
figure(7)
t=[-10:0.1:10];
h=trih(1./t);
plot(t,h),grid on
title('f.')

%g.
figure(8)
n=[-10:1:10];
x=disx(n-1);
stem(n,x),grid on
title('g.')

%h.
figure(9)
n=[-10:1:10];
x=disx(2*n);
stem(n,x),grid on
title('h.')

%i.
figure(10)
n=[-10:1:10];
x=disx(sqrt(n));
stem(n,x),grid on
title('i.')

%j.
figure(11)
n=[-10:1:10];
x=(1/2)*(disx(n)+((-1).^n).*disx(n));
stem(n,x),grid on
title('j.')

%k.
figure(12)
n=[-10:1:10];
impar=(disx(n)-disx(-n))/2;
x=impar
stem(n,x),grid on
title('k.')

%l.
figure(13)
n=[-10:1:10];
par=(disx(n)+disx(-n))/2;
x=par
stem(n,x),grid on
title('l.')

También podría gustarte